Skip to content

Conversation

marcelo-souzaf
Copy link

@marcelo-souzaf marcelo-souzaf commented Aug 4, 2024

Context

Resolves #2001.
A set is created with the resolved paths to avoid multiplicity, but glob expressions can't be used as paths, so the code fails when initializing the Config instance with one such expression.
Previously, Path.resolve was called, so the paths were relative to the current working directory (CWD).

Overview

  • Change the type of the config value "src_paths" from pathlib.Path to str.
  • Pass the CWD as the "directory" config key to make the paths relative to it instead of the project root.
  • Add a test.

Copy link
Member

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like it could do with a small regression test. Do you think you could add one?

@marcelo-souzaf
Copy link
Author

I've added one, but I'm not sure if this is the best way to test the CLI behavior.

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.

src_path glob patterns do not work from command line flag
2 participants