Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix infinite recursion on Windows #137

Merged

Conversation

ibachar-es
Copy link
Contributor

On windows, when running using VSCode and using the integrated terminal to launch my application, _caller_path returns a path starting with c:\ (lowercase) while os.path.abspath(os.sep) return C:\ (uppercase). This causes infinite recursion in _find_file

@henriquebastos
Copy link
Collaborator

Can you please provide a test case?

@sourcery-ai
Copy link

sourcery-ai bot commented Nov 13, 2022

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.19%.

Quality metrics Before After Change
Complexity 1.86 ⭐ 1.81 ⭐ -0.05 👍
Method Length 40.66 ⭐ 41.12 ⭐ 0.46 👎
Working memory 5.46 ⭐ 5.39 ⭐ -0.07 👍
Quality 84.47% 84.66% 0.19% 👍
Other metrics Before After Change
Lines 296 304 8
Changed files Quality Before Quality After Quality Change
decouple.py 82.34% ⭐ 82.22% ⭐ -0.12% 👎
tests/test_autoconfig.py 88.93% ⭐ 89.34% ⭐ 0.41% 👍

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
decouple.py RepositoryEnv.__init__ 10 🙂 114 🙂 11 😞 55.54% 🙂 Extract out complex expressions
decouple.py Config.get 7 ⭐ 81 🙂 11 😞 62.91% 🙂 Extract out complex expressions
decouple.py Csv.__init__ 0 ⭐ 42 ⭐ 10 😞 77.78% ⭐ Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

@ibachar-es
Copy link
Contributor Author

@henriquebastos Done

@ibachar-es
Copy link
Contributor Author

@henriquebastos It seems Sourcery complains about lines of code I didn't change in this PR

@henriquebastos henriquebastos merged commit 35a4cec into HBNetwork:master Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants