potiuk commented on a change in pull request #20470:
URL: https://github.com/apache/airflow/pull/20470#discussion_r774474211
##########
File path: airflow/dag_processing/processor.py
##########
@@ -149,8 +149,8 @@ def _run_file_processor(
try:
# redirect stdout/stderr to log
- with redirect_stdout(StreamLogWriter(log, logging.INFO)),
redirect_stderr(
- StreamLogWriter(log, logging.WARN)
+ with redirect_stdout(StreamLogWriter(log, logging.INFO)), ( #
type: ignore[type-var]
+ redirect_stderr(StreamLogWriter(log, logging.WARN)) # type:
ignore[type-var]
Review comment:
At least I pushed it down as much as I could. The ignores now simply
ignore those errors:
```
airflow/utils/log/logging_mixin.py:83: error: Definition of "__next__" in
base class "IOBase" is incompatible with definition in base class "IO"
class StreamLogWriter(IOBase, IO[str]):
^
airflow/utils/log/logging_mixin.py:83: error: Definition of "__next__" in
base class "IOBase" is incompatible with definition in base class "Iterator"
class StreamLogWriter(IOBase, IO[str]):
^
airflow/utils/log/logging_mixin.py:83: error: Definition of "readlines" in
base class "IOBase" is incompatible with definition in base class "IO"
class StreamLogWriter(IOBase, IO[str]):
^
airflow/utils/log/logging_mixin.py:83: error: Definition of "__iter__" in
base class "IOBase" is incompatible with definition in base class "IO"
class StreamLogWriter(IOBase, IO[str]):
^
airflow/utils/log/logging_mixin.py:83: error: Definition of "__iter__" in
base class "IOBase" is incompatible with definition in base class "Iterator"
class StreamLogWriter(IOBase, IO[str]):
^
airflow/utils/log/logging_mixin.py:83: error: Definition of "__iter__" in
base class "IOBase" is incompatible with definition in base class "Iterable"
class StreamLogWriter(IOBase, IO[str]):
^
airflow/utils/log/logging_mixin.py:83: error: Definition of "readline" in
base class "IOBase" is incompatible with definition in base class "IO"
class StreamLogWriter(IOBase, IO[str]):
^
airflow/utils/log/logging_mixin.py:83: error: Definition of "writelines" in
base class "IOBase" is incompatible with definition in base class "IO"
class StreamLogWriter(IOBase, IO[str]):
^
airflow/utils/log/logging_mixin.py:83: error: Definition of "__enter__" in
base class "IOBase" is incompatible with definition in base class "IO"
class StreamLogWriter(IOBase, IO[str]):
^
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]