kaxil commented on code in PR #23597:
URL: https://github.com/apache/airflow/pull/23597#discussion_r872213321


##########
.pre-commit-config.yaml:
##########
@@ -723,6 +723,14 @@ repos:
         files: \.py$
         exclude: ^airflow/_vendor/
         additional_dependencies: ['rich']
+      - id: check-fstrings-logging
+        name: Ensure f-strings are not used in logging calls.
+        pass_filenames: false
+        always_run: true
+        entry: ./scripts/ci/pre_commit/pre_commit_check_logging_for_fstrings.py
+        language: python
+        require_serial: true
+        additional_dependencies: ['rich']

Review Comment:
   You can use this flake8 extension 
https://github.com/globality-corp/flake8-logging-format . I was planning to do 
this when I added it for astronomer-providers repo - 
https://github.com/astronomer/astronomer-providers/blob/main/.pre-commit-config.yaml#L66
   
   ```
   
flake8............................................................................Failed
   - hook id: flake8
   - exit code: 1
   
   astronomer/providers/amazon/aws/operators/emr.py:64:23: G004 Logging 
statement uses f-string
   ```



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