Open kasium opened 2 years ago
For python3.7 the rule doesn't work when f-strings are somehow used in functions. However, in pyrhon3.11 it works as expected
import os def get_framework_info(): if f"foo" in os.environ: port = os.environ[f"foo"]
python3.7: nothing python3.11: Use 'os.environ.get(f"""foo""")' instead of 'if f"""foo""" in os.environ: os.environ[f"""foo"""]'
Use 'os.environ.get(f"""foo""")' instead of 'if f"""foo""" in os.environ: os.environ[f"""foo"""]'
Desired change
Explanation
For python3.7 the rule doesn't work when f-strings are somehow used in functions. However, in pyrhon3.11 it works as expected
Example
python3.7: nothing python3.11:
Use 'os.environ.get(f"""foo""")' instead of 'if f"""foo""" in os.environ: os.environ[f"""foo"""]'