This commit is contained in:
Kaxil Naik 2020-06-27 18:19:21 +01:00 коммит произвёл GitHub
Родитель e3e20e773b
Коммит c420dbd6e1
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
24 изменённых файлов: 101 добавлений и 95 удалений

4
.github/workflows/ci.yml поставляемый
Просмотреть файл

@ -57,7 +57,7 @@ jobs:
- name: Cache pre-commit env
uses: actions/cache@v2
env:
cache-name: cache-pre-commit-v2
cache-name: cache-pre-commit-v3
with:
path: ~/.cache/pre-commit
key: ${{ env.cache-name }}-${{ github.job }}-${{ hashFiles('.pre-commit-config.yaml') }}
@ -90,7 +90,7 @@ jobs:
- name: Cache pre-commit env
uses: actions/cache@v2
env:
cache-name: cache-pre-commit
cache-name: cache-pre-commit-v1
with:
path: ~/.cache/pre-commit
key: ${{ env.cache-name }}-${{ github.job }}-${{ hashFiles('.pre-commit-config.yaml') }}

Просмотреть файл

@ -43,7 +43,7 @@ class ConnectionCollectionItemSchema(SQLAlchemySchema):
# We will be able to remove this when we upgrade to marshmallow 3.
# To remove it, we would need to set unknown=EXCLUDE in Meta
@validates_schema(pass_original=True)
def check_unknown_fields(self, data, original_data):
def check_unknown_fields(self, data, original_data): # pylint: disable=unused-argument
""" Validates unknown field """
unknown = set(original_data) - set(self.fields)
if unknown:

Просмотреть файл

@ -49,7 +49,7 @@ class DebugExecutor(BaseExecutor):
self.tasks_params: Dict[TaskInstanceKeyType, Dict[str, Any]] = {}
self.fail_fast = conf.getboolean("debug", "fail_fast")
def execute_async(self, *args, **kwargs) -> None:
def execute_async(self, *args, **kwargs) -> None: # pylint: disable=signature-differs
"""
The method is replaced by custom trigger_task implementation.
"""

Просмотреть файл

@ -153,13 +153,13 @@ class LocalExecutor(BaseExecutor):
self.executor.workers_used = 0
self.executor.workers_active = 0
# pylint: disable=unused-argument # pragma: no cover
# noinspection PyUnusedLocal
def execute_async(self,
key: TaskInstanceKeyType,
command: CommandType,
queue: Optional[str] = None,
executor_config: Optional[Any] = None) -> None: \
# pylint: disable=unused-argument # pragma: no cover
executor_config: Optional[Any] = None) -> None:
"""
Executes task asynchronously.
@ -175,6 +175,7 @@ class LocalExecutor(BaseExecutor):
self.executor.workers_active += 1
local_worker.start()
# pylint: enable=unused-argument # pragma: no cover
def sync(self) -> None:
"""
Sync will get called periodically by the heartbeat method.
@ -224,12 +225,13 @@ class LocalExecutor(BaseExecutor):
worker.start()
# noinspection PyUnusedLocal
def execute_async(self,
def execute_async(
self,
key: TaskInstanceKeyType,
command: CommandType,
queue: Optional[str] = None,
executor_config: Optional[Any] = None) -> None: \
# pylint: disable=unused-argument # pragma: no cover
queue: Optional[str] = None, # pylint: disable=unused-argument
executor_config: Optional[Any] = None # pylint: disable=unused-argument
) -> None:
"""
Executes task asynchronously.

Просмотреть файл

@ -73,11 +73,14 @@ class LocalTaskJob(BaseJob):
def _execute(self):
self.task_runner = get_task_runner(self)
# pylint: disable=unused-argument
def signal_handler(signum, frame):
"""Setting kill signal handler"""
self.log.error("Received SIGTERM. Terminating subprocesses")
self.on_kill()
raise AirflowException("LocalTaskJob received SIGTERM signal")
# pylint: enable=unused-argument
signal.signal(signal.SIGTERM, signal_handler)
if not self.task_instance.check_and_change_state_before_execution(

Просмотреть файл

@ -50,7 +50,7 @@ class Pool(Base):
DEFAULT_POOL_NAME = 'default_pool'
def __repr__(self):
return self.pool
return str(self.pool) # pylint: disable=E0012
@staticmethod
@provide_session

Просмотреть файл

@ -97,7 +97,7 @@ with models.DAG(
requested_run_time={"seconds": int(time.time() + 60)},
)
run_id = (
"{{ task_instance.xcom_pull('gcp_bigquery_start_transfer', " "key='run_id') }}"
"{{ task_instance.xcom_pull('gcp_bigquery_start_transfer', key='run_id') }}"
)
# [END howto_bigquery_start_transfer]

Просмотреть файл

@ -145,8 +145,9 @@ class CloudFunctionsHook(GoogleBaseHook):
:return: The upload URL that was returned by generateUploadUrl method.
:rtype: str
"""
# pylint: disable=no-member # noqa
response = \
self.get_conn().projects().locations().functions().generateUploadUrl( # pylint: disable=no-member # noqa
self.get_conn().projects().locations().functions().generateUploadUrl(
parent=self._full_location(project_id, location)
).execute(num_retries=self.num_retries)

Просмотреть файл

@ -273,7 +273,7 @@ class GCSHook(GoogleBaseHook):
self,
bucket_name: Optional[str] = None,
object_name: Optional[str] = None,
object_url: Optional[str] = None
object_url: Optional[str] = None # pylint: disable=unused-argument
):
"""
Downloads the file to a temporary directory and returns a file handle

Просмотреть файл

@ -199,8 +199,7 @@ def poke_mode_only(cls):
def mode_setter(_, value):
if value != 'poke':
raise ValueError(
f"cannot set mode to 'poke'.")
raise ValueError("cannot set mode to 'poke'.")
if not issubclass(cls_type, BaseSensorOperator):
raise ValueError(f"poke_mode_only decorator should only be "

Просмотреть файл

@ -32,7 +32,7 @@ def setup_event_handlers(engine):
"""
Setups event handlers.
"""
# pylint: disable=unused-argument
# pylint: disable=unused-argument, unused-variable
@event.listens_for(engine, "connect")
def connect(dbapi_connection, connection_record):
connection_record.info['pid'] = os.getpid()
@ -78,3 +78,4 @@ def setup_event_handlers(engine):
log.info("@SQLALCHEMY %s |$ %s |$ %s |$ %s ",
total, file_name, stack_info, statement.replace("\n", " ")
)
# pylint: enable=unused-argument, unused-variable

Просмотреть файл

@ -33,7 +33,7 @@ class timeout(LoggingMixin): # pylint: disable=invalid-name
self.seconds = seconds
self.error_message = error_message + ', PID: ' + str(os.getpid())
def handle_timeout(self, signum, frame):
def handle_timeout(self, signum, frame): # pylint: disable=unused-argument
"""
Logs information and raises AirflowTaskTimeout.
"""

Просмотреть файл

@ -456,9 +456,10 @@ class AirflowSecurityManager(SecurityManager, LoggingMixin):
all_perm_views = {role.permission_view_id for role in all_perm_view_by_user}
for role in dag_role:
# pylint: disable=no-member
# Get all the perm-view of the role
existing_perm_view_by_user = self.get_session.query(ab_perm_view_role)\
.filter(ab_perm_view_role.columns.role_id == role.id) # pylint: disable=no-member
.filter(ab_perm_view_role.columns.role_id == role.id)
existing_perms_views = {pv.permission_view_id for pv in existing_perm_view_by_user}
missing_perm_views = all_perm_views - existing_perms_views

Просмотреть файл

@ -28,7 +28,7 @@ PyYAML==5.3.1
Pygments==2.6.1
SQLAlchemy-JSONField==0.9.0
SQLAlchemy-Utils==0.36.6
SQLAlchemy==1.3.17
SQLAlchemy==1.3.18
Sphinx==3.1.1
Unidecode==1.1.1
WTForms==2.3.1
@ -72,19 +72,19 @@ beautifulsoup4==4.7.1
billiard==3.6.3.0
black==19.10b0
blinker==1.4
boto3==1.14.8
boto3==1.14.11
boto==2.49.0
botocore==1.17.8
botocore==1.17.11
bowler==0.8.0
cached-property==1.5.1
cachetools==4.1.0
cassandra-driver==3.20.2
cattrs==1.0.0
celery==4.4.5
celery==4.4.6
certifi==2020.6.20
cffi==1.14.0
cfgv==3.1.0
cfn-lint==0.33.1
cfn-lint==0.33.2
cgroupspy==0.1.6
chardet==3.0.4
click==6.7
@ -101,7 +101,7 @@ cryptography==2.9.2
curlify==2.2.1
cx-Oracle==7.3.0
dask==2.19.0
datadog==0.37.0
datadog==0.37.1
decorator==4.4.2
defusedxml==0.6.0
dill==0.3.2
@ -159,7 +159,7 @@ google-cloud-monitoring==1.0.0
google-cloud-pubsub==1.6.0
google-cloud-redis==1.0.0
google-cloud-secret-manager==1.0.0
google-cloud-spanner==1.17.0
google-cloud-spanner==1.17.1
google-cloud-speech==1.3.2
google-cloud-storage==1.29.0
google-cloud-tasks==1.5.0
@ -173,7 +173,7 @@ graphviz==0.14
greenlet==0.4.16
grpc-google-iam-v1==0.12.3
grpcio-gcp==0.2.2
grpcio==1.29.0
grpcio==1.30.0
gunicorn==19.10.0
hdfs==2.5.8
hmsclient==0.1.1
@ -189,7 +189,7 @@ immutables==0.14
importlib-metadata==1.6.1
importlib-resources==2.0.1
inflection==0.5.0
ipdb==0.13.2
ipdb==0.13.3
ipython-genutils==0.2.0
ipython==7.15.0
iso8601==0.1.12
@ -208,7 +208,7 @@ jsonschema==3.2.0
junit-xml==1.9
jupyter-client==6.1.3
jupyter-core==4.6.3
kombu==4.6.10
kombu==4.6.11
kubernetes==11.0.0
lazy-object-proxy==1.5.0
ldap3==2.7
@ -224,7 +224,7 @@ monotonic==1.5
more-itertools==8.4.0
moto==1.3.14
msgpack==1.0.0
msrest==0.6.16
msrest==0.6.17
msrestazure==0.6.3
multi-key-dict==2.0.3
multidict==4.7.6
@ -269,7 +269,7 @@ psutil==5.7.0
psycopg2-binary==2.8.5
ptyprocess==0.6.0
py4j==0.10.9
py==1.8.2
py==1.9.0
pyOpenSSL==19.1.0
pyarrow==0.17.1
pyasn1-modules==0.2.8
@ -277,13 +277,13 @@ pyasn1==0.4.8
pycodestyle==2.6.0
pycountry==19.8.18
pycparser==2.20
pycryptodomex==3.9.7
pycryptodomex==3.9.8
pydata-google-auth==1.1.0
pydruid==0.5.8
pyexasol==0.13.1
pyflakes==2.2.0
pykerberos==1.2.1
pylint==2.4.4
pylint==2.5.3
pymongo==3.10.1
pymssql==2.1.4
pyodbc==4.0.30
@ -293,7 +293,7 @@ pyrsistent==0.16.0
pysftp==0.2.9
pyspark==3.0.0
pytest-cov==2.10.0
pytest-forked==1.1.3
pytest-forked==1.2.0
pytest-instafail==0.4.2
pytest-rerunfailures==9.0
pytest-timeout==1.4.1
@ -326,17 +326,17 @@ rsa==4.6
s3transfer==0.3.3
sasl==0.2.1
semver==2.10.2
sendgrid==6.3.1
sendgrid==6.4.1
sentinels==1.0.0
sentry-sdk==0.15.1
setproctitle==1.1.10
sh==1.13.1
simple-salesforce==1.1.0
six==1.15.0
slackclient==2.7.1
slackclient==2.7.2
smmap==3.0.4
snowballstemmer==2.0.0
snowflake-connector-python==2.2.7
snowflake-connector-python==2.2.8
snowflake-sqlalchemy==1.2.3
sortedcontainers==2.2.2
soupsieve==2.0.1
@ -357,6 +357,7 @@ sphinxcontrib-serializinghtml==1.1.4
spython==0.0.84
sshpubkeys==3.1.0
sshtunnel==0.1.5
starkbank-ecdsa==1.0.0
statsd==3.3.0
swagger-ui-bundle==0.0.6
tableauserverclient==0.9
@ -381,9 +382,9 @@ uritemplate==3.0.1
urllib3==1.25.9
vertica-python==0.10.4
vine==1.3.0
virtualenv==20.0.24
virtualenv==20.0.25
watchtower==0.7.3
wcwidth==0.2.4
wcwidth==0.2.5
websocket-client==0.57.0
wrapt==1.12.1
xmltodict==0.12.0

Просмотреть файл

@ -28,7 +28,7 @@ PyYAML==5.3.1
Pygments==2.6.1
SQLAlchemy-JSONField==0.9.0
SQLAlchemy-Utils==0.36.6
SQLAlchemy==1.3.17
SQLAlchemy==1.3.18
Sphinx==3.1.1
Unidecode==1.1.1
WTForms==2.3.1
@ -72,19 +72,19 @@ beautifulsoup4==4.7.1
billiard==3.6.3.0
black==19.10b0
blinker==1.4
boto3==1.14.8
boto3==1.14.11
boto==2.49.0
botocore==1.17.8
botocore==1.17.11
bowler==0.8.0
cached-property==1.5.1
cachetools==4.1.0
cassandra-driver==3.20.2
cattrs==1.0.0
celery==4.4.5
celery==4.4.6
certifi==2020.6.20
cffi==1.14.0
cfgv==3.1.0
cfn-lint==0.33.1
cfn-lint==0.33.2
cgroupspy==0.1.6
chardet==3.0.4
click==6.7
@ -100,7 +100,7 @@ cryptography==2.9.2
curlify==2.2.1
cx-Oracle==7.3.0
dask==2.19.0
datadog==0.37.0
datadog==0.37.1
decorator==4.4.2
defusedxml==0.6.0
dill==0.3.2
@ -158,7 +158,7 @@ google-cloud-monitoring==1.0.0
google-cloud-pubsub==1.6.0
google-cloud-redis==1.0.0
google-cloud-secret-manager==1.0.0
google-cloud-spanner==1.17.0
google-cloud-spanner==1.17.1
google-cloud-speech==1.3.2
google-cloud-storage==1.29.0
google-cloud-tasks==1.5.0
@ -172,7 +172,7 @@ graphviz==0.14
greenlet==0.4.16
grpc-google-iam-v1==0.12.3
grpcio-gcp==0.2.2
grpcio==1.29.0
grpcio==1.30.0
gunicorn==19.10.0
hdfs==2.5.8
hmsclient==0.1.1
@ -185,7 +185,7 @@ ijson==2.6.1
imagesize==1.2.0
importlib-metadata==1.6.1
inflection==0.5.0
ipdb==0.13.2
ipdb==0.13.3
ipython-genutils==0.2.0
ipython==7.15.0
iso8601==0.1.12
@ -204,7 +204,7 @@ jsonschema==3.2.0
junit-xml==1.9
jupyter-client==6.1.3
jupyter-core==4.6.3
kombu==4.6.10
kombu==4.6.11
kubernetes==11.0.0
lazy-object-proxy==1.5.0
ldap3==2.7
@ -220,7 +220,7 @@ monotonic==1.5
more-itertools==8.4.0
moto==1.3.14
msgpack==1.0.0
msrest==0.6.16
msrest==0.6.17
msrestazure==0.6.3
multi-key-dict==2.0.3
multidict==4.7.6
@ -264,7 +264,7 @@ psutil==5.7.0
psycopg2-binary==2.8.5
ptyprocess==0.6.0
py4j==0.10.9
py==1.8.2
py==1.9.0
pyOpenSSL==19.1.0
pyarrow==0.17.1
pyasn1-modules==0.2.8
@ -272,13 +272,13 @@ pyasn1==0.4.8
pycodestyle==2.6.0
pycountry==19.8.18
pycparser==2.20
pycryptodomex==3.9.7
pycryptodomex==3.9.8
pydata-google-auth==1.1.0
pydruid==0.5.8
pyexasol==0.13.1
pyflakes==2.2.0
pykerberos==1.2.1
pylint==2.4.4
pylint==2.5.3
pymongo==3.10.1
pymssql==2.1.4
pyodbc==4.0.30
@ -288,7 +288,7 @@ pyrsistent==0.16.0
pysftp==0.2.9
pyspark==3.0.0
pytest-cov==2.10.0
pytest-forked==1.1.3
pytest-forked==1.2.0
pytest-instafail==0.4.2
pytest-rerunfailures==9.0
pytest-timeout==1.4.1
@ -321,17 +321,17 @@ rsa==4.6
s3transfer==0.3.3
sasl==0.2.1
semver==2.10.2
sendgrid==6.3.1
sendgrid==6.4.1
sentinels==1.0.0
sentry-sdk==0.15.1
setproctitle==1.1.10
sh==1.13.1
simple-salesforce==1.1.0
six==1.15.0
slackclient==2.7.1
slackclient==2.7.2
smmap==3.0.4
snowballstemmer==2.0.0
snowflake-connector-python==2.2.7
snowflake-connector-python==2.2.8
snowflake-sqlalchemy==1.2.3
sortedcontainers==2.2.2
soupsieve==2.0.1
@ -352,6 +352,7 @@ sphinxcontrib-serializinghtml==1.1.4
spython==0.0.84
sshpubkeys==3.1.0
sshtunnel==0.1.5
starkbank-ecdsa==1.0.0
statsd==3.3.0
swagger-ui-bundle==0.0.6
tableauserverclient==0.9
@ -375,9 +376,9 @@ uritemplate==3.0.1
urllib3==1.25.9
vertica-python==0.10.4
vine==1.3.0
virtualenv==20.0.24
virtualenv==20.0.25
watchtower==0.7.3
wcwidth==0.2.4
wcwidth==0.2.5
websocket-client==0.57.0
wrapt==1.12.1
xmltodict==0.12.0

Просмотреть файл

@ -28,7 +28,7 @@ PyYAML==5.3.1
Pygments==2.6.1
SQLAlchemy-JSONField==0.9.0
SQLAlchemy-Utils==0.36.6
SQLAlchemy==1.3.17
SQLAlchemy==1.3.18
Sphinx==3.1.1
Unidecode==1.1.1
WTForms==2.3.1
@ -45,7 +45,7 @@ apispec==1.3.3
appdirs==1.4.4
argcomplete==1.11.1
asn1crypto==1.3.0
astroid==2.3.3
astroid==2.4.2
async-generator==1.10
async-timeout==3.0.1
atlasclient==1.0.0
@ -72,19 +72,19 @@ beautifulsoup4==4.7.1
billiard==3.6.3.0
black==19.10b0
blinker==1.4
boto3==1.14.8
boto3==1.14.11
boto==2.49.0
botocore==1.17.8
botocore==1.17.11
bowler==0.8.0
cached-property==1.5.1
cachetools==4.1.0
cassandra-driver==3.20.2
cattrs==1.0.0
celery==4.4.5
celery==4.4.6
certifi==2020.6.20
cffi==1.14.0
cfgv==3.1.0
cfn-lint==0.33.1
cfn-lint==0.33.2
cgroupspy==0.1.6
chardet==3.0.4
click==6.7
@ -100,7 +100,7 @@ cryptography==2.9.2
curlify==2.2.1
cx-Oracle==7.3.0
dask==2.19.0
datadog==0.37.0
datadog==0.37.1
decorator==4.4.2
defusedxml==0.6.0
dill==0.3.2
@ -158,7 +158,7 @@ google-cloud-monitoring==1.0.0
google-cloud-pubsub==1.6.0
google-cloud-redis==1.0.0
google-cloud-secret-manager==1.0.0
google-cloud-spanner==1.17.0
google-cloud-spanner==1.17.1
google-cloud-speech==1.3.2
google-cloud-storage==1.29.0
google-cloud-tasks==1.5.0
@ -172,7 +172,7 @@ graphviz==0.14
greenlet==0.4.16
grpc-google-iam-v1==0.12.3
grpcio-gcp==0.2.2
grpcio==1.29.0
grpcio==1.30.0
gunicorn==19.10.0
hdfs==2.5.8
hmsclient==0.1.1
@ -185,7 +185,7 @@ ijson==2.6.1
imagesize==1.2.0
importlib-metadata==1.6.1
inflection==0.5.0
ipdb==0.13.2
ipdb==0.13.3
ipython-genutils==0.2.0
ipython==7.15.0
iso8601==0.1.12
@ -204,7 +204,7 @@ jsonschema==3.2.0
junit-xml==1.9
jupyter-client==6.1.3
jupyter-core==4.6.3
kombu==4.6.10
kombu==4.6.11
kubernetes==11.0.0
lazy-object-proxy==1.5.0
ldap3==2.7
@ -220,7 +220,7 @@ monotonic==1.5
more-itertools==8.4.0
moto==1.3.14
msgpack==1.0.0
msrest==0.6.16
msrest==0.6.17
msrestazure==0.6.3
multi-key-dict==2.0.3
multidict==4.7.6
@ -264,7 +264,7 @@ psutil==5.7.0
psycopg2-binary==2.8.5
ptyprocess==0.6.0
py4j==0.10.9
py==1.8.2
py==1.9.0
pyOpenSSL==19.1.0
pyarrow==0.17.1
pyasn1-modules==0.2.8
@ -272,13 +272,13 @@ pyasn1==0.4.8
pycodestyle==2.6.0
pycountry==19.8.18
pycparser==2.20
pycryptodomex==3.9.7
pycryptodomex==3.9.8
pydata-google-auth==1.1.0
pydruid==0.5.8
pyexasol==0.13.1
pyflakes==2.2.0
pykerberos==1.2.1
pylint==2.4.4
pylint==2.5.3
pymongo==3.10.1
pyodbc==4.0.30
pyparsing==2.4.7
@ -287,7 +287,7 @@ pyrsistent==0.16.0
pysftp==0.2.9
pyspark==3.0.0
pytest-cov==2.10.0
pytest-forked==1.1.3
pytest-forked==1.2.0
pytest-instafail==0.4.2
pytest-rerunfailures==9.0
pytest-timeout==1.4.1
@ -320,17 +320,17 @@ rsa==4.6
s3transfer==0.3.3
sasl==0.2.1
semver==2.10.2
sendgrid==6.3.1
sendgrid==6.4.1
sentinels==1.0.0
sentry-sdk==0.15.1
setproctitle==1.1.10
sh==1.13.1
simple-salesforce==1.1.0
six==1.15.0
slackclient==2.7.1
slackclient==2.7.2
smmap==3.0.4
snowballstemmer==2.0.0
snowflake-connector-python==2.2.7
snowflake-connector-python==2.2.8
snowflake-sqlalchemy==1.2.3
sortedcontainers==2.2.2
soupsieve==2.0.1
@ -351,6 +351,7 @@ sphinxcontrib-serializinghtml==1.1.4
spython==0.0.84
sshpubkeys==3.1.0
sshtunnel==0.1.5
starkbank-ecdsa==1.0.0
statsd==3.3.0
swagger-ui-bundle==0.0.6
tableauserverclient==0.9
@ -374,9 +375,9 @@ uritemplate==3.0.1
urllib3==1.25.9
vertica-python==0.10.4
vine==1.3.0
virtualenv==20.0.24
virtualenv==20.0.25
watchtower==0.7.3
wcwidth==0.2.4
wcwidth==0.2.5
websocket-client==0.57.0
wrapt==1.12.1
xmltodict==0.12.0

Просмотреть файл

@ -1 +1 @@
cac9433ddd48ca884fa160b007be3818 /opt/airflow/setup.py
ab047ae7da10b1a5efb746c9c4a403fe /opt/airflow/setup.py

Просмотреть файл

@ -1 +1 @@
cac9433ddd48ca884fa160b007be3818 /opt/airflow/setup.py
ab047ae7da10b1a5efb746c9c4a403fe /opt/airflow/setup.py

Просмотреть файл

@ -1 +1 @@
cac9433ddd48ca884fa160b007be3818 /opt/airflow/setup.py
ab047ae7da10b1a5efb746c9c4a403fe /opt/airflow/setup.py

Просмотреть файл

@ -455,7 +455,7 @@ devel = [
'paramiko',
'pipdeptree',
'pre-commit',
'pylint==2.4.4',
'pylint==2.5.3',
'pysftp',
'pytest',
'pytest-cov',

Просмотреть файл

@ -125,7 +125,7 @@ class TestCeleryExecutor(unittest.TestCase):
]
# "Enqueue" them. We don't have a real SimpleTaskInstance, so directly edit the dict
for (key, simple_ti, command, queue, task) in task_tuples_to_send:
for (key, simple_ti, command, queue, task) in task_tuples_to_send: # pylint: disable=W0612
executor.queued_tasks[key] = (command, 1, queue, simple_ti)
executor._process_tasks(task_tuples_to_send)

Просмотреть файл

@ -69,12 +69,8 @@ class TestPluginsRBAC(unittest.TestCase):
self.assertTrue('test_plugin' in self.app.blueprints)
self.assertEqual(self.app.blueprints['test_plugin'].name, bp.name)
@mock.patch('airflow.plugins_manager.import_errors', return_value={})
@mock.patch('airflow.plugins_manager.plugins', return_value=[])
@mock.patch('airflow.plugins_manager.pkg_resources.iter_entry_points')
def test_entrypoint_plugin_errors_dont_raise_exceptions(
self, mock_ep_plugins, mock_plugins, mock_import_errors
):
def test_entrypoint_plugin_errors_dont_raise_exceptions(self, mock_ep_plugins):
"""
Test that Airflow does not raise an Error if there is any Exception because of the
Plugin.
@ -95,7 +91,7 @@ class TestPluginsRBAC(unittest.TestCase):
assert "Traceback (most recent call last):" in received_logs
assert "Version Conflict" in received_logs
assert "Failed to import plugin test-entrypoint" in received_logs
assert "Version Conflict", "test.plugins.test_plugins_manager" in import_errors.items()
assert ("test.plugins.test_plugins_manager", "Version Conflict") in import_errors.items()
class TestPluginsManager(unittest.TestCase):

Просмотреть файл

@ -272,7 +272,7 @@ class TestCore(unittest.TestCase):
def __len__(self): # pylint: disable=invalid-length-returned
return NotImplemented
def __bool__(self):
def __bool__(self): # pylint: disable=invalid-bool-returned, bad-option-value
return NotImplemented
op = OperatorSubclass(

Просмотреть файл

@ -24,5 +24,5 @@ class FakeDatetime(datetime):
A fake replacement for datetime that can be mocked for testing.
"""
def __new__(cls, *args, **kwargs):
def __new__(cls, *args, **kwargs): # pylint: disable=signature-differs
return datetime.__new__(datetime, *args, **kwargs)