o-nikolas commented on code in PR #27359:
URL: https://github.com/apache/airflow/pull/27359#discussion_r1008654420
##########
scripts/tools/initialize_virtualenv.py:
##########
@@ -111,7 +111,7 @@ def main():
"""
Setup local virtual environment.
"""
- airflow_home_dir = os.environ.get("AIRFLOW_HOME", Path.home() / "airflow")
+ airflow_home_dir = Path(os.environ.get("AIRFLOW_HOME", Path.home() /
"airflow"))
airflow_sources = str(Path(__file__).parents[2])
Review Comment:
I think it's safest for this to be a Path object as well, instead of casting
to a string. A few lines below `airflow_home_dir` and `airflow_sources` are
compared for equality, which I think is bound to always return False when
comparing a string between a Path. We should have a unit test covering this as
well.
--
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]