Dev-iL opened a new pull request, #59746:
URL: https://github.com/apache/airflow/pull/59746

   <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
   
      http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   The 22 addressed violations:
   ```none
   airflow-core/src/airflow/_shared/configuration/parser.py:251: error: Need 
type annotation for "upgraded_values" (hint:
   "upgraded_values: dict[<type>, <type>] = ...")  [var-annotated]
               self.upgraded_values = {}
               ^~~~~~~~~~~~~~~~~~~~
   airflow-core/src/airflow/_shared/configuration/parser.py:285: error: An 
overloaded function outside a stub file must have an
   implementation  [no-overload-impl]
           @overload  # type: ignore[override]
            ^
   airflow-core/src/airflow/_shared/configuration/parser.py:285: note: Error 
code "no-overload-impl" not covered by "type: ignore" comment
   airflow-core/src/airflow/_shared/configuration/parser.py:980: error: Name 
"get" already defined on line 285  [no-redef]
           @overload  # type: ignore[override]
            ^
   airflow-core/src/airflow/_shared/configuration/parser.py:980: note: Error 
code "no-redef" not covered by "type: ignore" comment
   
airflow-core/src/airflow/_shared/observability/metrics/datadog_logger.py:179: 
error: Argument 1 to "DogStatsd" has incompatible type
   "str | None"; expected "str"  [arg-type]
               host,
               ^~~~
   
airflow-core/src/airflow/_shared/observability/metrics/datadog_logger.py:180: 
error: Argument 2 to "DogStatsd" has incompatible type
   "int | None"; expected "int"  [arg-type]
               port,
               ^~~~
   
airflow-core/src/airflow/_shared/observability/metrics/datadog_logger.py:181: 
error: Argument 3 to "DogStatsd" has incompatible type
   "str | None"; expected "None"  [arg-type]
               namespace,
               ^~~~~~~~~
   airflow-core/src/airflow/_shared/observability/traces/otel_tracer.py:81: 
error: Dict entry 0 has incompatible type "str": "str | None";
   expected "str": "int | float | Sequence[str] | Sequence[int] | 
Sequence[float]"  [dict-item]
               self.resource = Resource.create(attributes={SERVICE_NAME: 
self.otel_service})
                                                           
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   airflow-core/src/airflow/_shared/observability/traces/otel_tracer.py:150: 
error: Argument "component" to "get_tracer" of "OtelTrace"
   has incompatible type "str | None"; expected "str"  [arg-type]
               tracer = self.get_tracer(component=component, trace_id=trace_id, 
span_id=span_id)
                                                  ^~~~~~~~~
   airflow-core/src/airflow/_shared/observability/traces/otel_tracer.py:259: 
error: Argument "component" to "get_tracer" of "OtelTrace"
   has incompatible type "str | None"; expected "str"  [arg-type]
               tracer = self.get_tracer(component=component)
                                                  ^~~~~~~~~
   airflow-core/src/airflow/_shared/observability/metrics/otel_logger.py:391: 
error: Dict entry 0 has incompatible type "str":
   "str | None"; expected "str": "int | float | Sequence[str] | Sequence[int] | 
Sequence[float]"  [dict-item]
           resource = Resource.create(attributes={SERVICE_NAME: service_name})
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
   airflow-core/src/airflow/_shared/observability/metrics/otel_logger.py:423: 
error: Argument 2 to "SafeOtelLogger" has incompatible type
   "str | None"; expected "str"  [arg-type]
               metrics.get_meter_provider(), prefix, validator, 
stat_name_handler, statsd_influxdb_enabled
                                             ^~~~~~
   airflow-core/src/airflow/_shared/logging/structlog.py:99: error: 
Incompatible types in assignment (expression has type
   "Mapping[Any, Any]", variable has type "tuple[Any, ...]")  [assignment]
                       args = args[0]
                              ^~~~~~~
   airflow-core/src/airflow/_shared/logging/structlog.py:289: error: 
Incompatible types in assignment (expression has type
   "tuple[Module, Module, Module]", variable has type "tuple[Module, Module]")  
[assignment]
               suppress += (httpcore,)
               ^~~~~~~~~~~~~~~~~~~~~~~
   airflow-core/src/airflow/_shared/logging/structlog.py:295: error: 
Incompatible types in assignment (expression has type
   "tuple[Module, Module, Module]", variable has type "tuple[Module, Module]")  
[assignment]
               suppress += (httpx,)
               ^~~~~~~~~~~~~~~~~~~~
   airflow-core/src/airflow/_shared/logging/structlog.py:323: error: Item "str" 
of "str | bytes" has no attribute "decode"  [union-attr]
                   return json(logger, method_name, event_dict).decode("utf-8")
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   airflow-core/src/airflow/_shared/logging/structlog.py:346: error: 
Incompatible types in assignment (expression has type
   "Callable[[TextIO, tuple[type[BaseException], BaseException, TracebackType | 
None]], None]", variable has type "RichTracebackFormatter")
    [assignment]
               exc_formatter = structlog.dev.plain_traceback
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   airflow-core/src/airflow/_shared/logging/structlog.py:372: error: 
Incompatible types in assignment (expression has type
   "ConsoleRenderer", variable has type "PercentFormatRender")  [assignment]
               console = structlog.dev.ConsoleRenderer(
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   airflow-core/src/airflow/_shared/logging/structlog.py:482: error: Argument 1 
to "LoggerFactory" has incompatible type
   "type[NamedBytesLogger]"; expected "Callable[[str | None, LogOutputType | 
None], Any]"  [arg-type]
               logger_factory = LoggerFactory(NamedBytesLogger, io=output)
                                              ^~~~~~~~~~~~~~~~
   airflow-core/src/airflow/_shared/logging/structlog.py:489: error: Value of 
type variable "_BufferT_co" of "TextIOWrapper" cannot be
   "LogOutputType"  [type-var]
                   output = io.TextIOWrapper(output, line_buffering=True)
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   airflow-core/src/airflow/_shared/logging/structlog.py:489: error: 
Incompatible types in assignment (expression has type
   "TextIOWrapper[LogOutputType]", variable has type "LogOutputType | None")  
[assignment]
                   output = io.TextIOWrapper(output, line_buffering=True)
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   airflow-core/src/airflow/_shared/logging/structlog.py:490: error: Argument 1 
to "LoggerFactory" has incompatible type
   "type[NamedWriteLogger]"; expected "Callable[[str | None, LogOutputType | 
None], Any]"  [arg-type]
               logger_factory = LoggerFactory(NamedWriteLogger, io=output)
                                              ^~~~~~~~~~~~~~~~
   airflow-core/src/airflow/jobs/scheduler_job_runner.py:2191: error: 
Incompatible types in assignment (expression has type
   "DagRun | None", variable has type "DagRun")  [assignment]
                       dag_run = session.scalar(
                                 ^~~~~~~~~~~~~~~
   Found 22 errors in 6 files (checked 1078 source files)
   ```
   
   
   <!-- Please keep an empty line above the dashes. -->
   ---
   **^ Add meaningful description above**
   Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)**
 for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals))
 is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party 
License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a 
newsfragment file, named `{pr_number}.significant.rst` or 
`{issue_number}.significant.rst`, in 
[airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
   


-- 
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]

Reply via email to