feat: Read config from config file or pyproject.toml#10
Conversation
|
Handles #8 |
|
Tried pushing to your branch but was rejected 😕 |
I guess I didn't make it editable... will I open new PR or will you make a PR against my repo 😂 |
|
Huh. Maybe once it gets out of draft? Weird. |
|
I just changed it to draft hoping the option would appear |
|
Oh OK. Can you try to open a new PR then? It will be easier than me sending a PR to your fork so that you can send it back... 😅 |
|
I think it's because the fork is in organisation... edit: yep, now should work |
|
Nice, thanks 🙂 We should now document the feature. We can probably document each item in the |
|
After your changes |
|
I've added a TypedDict for the configuration to allow docstr for each entry separately. I think it's clearer than a single docstr for all entries |
3fe0c4e to
73e8036
Compare
srsly 🤣 |
73e8036 to
1976115
Compare
AFAIK you shouldn't mix |
1976115 to
fb916d6
Compare
fb916d6 to
d669c05
Compare
|
Yeah that removes the need for importing the symbols.
Why? Until our lowest supported version is Python 3.14 (PEP 649), I think it's reasonable.
Right this should be |
They pretty much handle the same cases, type/lazy and potential recursive imports. Shouldn't one suffice? |
|
Future annotations let you do this kind of things while waiting for PEP 649: class A:
@staticmethod
def create_a() -> A: ...def func() -> A:
return A()
class A:
pass |
|
So do you want to merge, add something or you want me to figure what other entries do and update the docstrs? |
|
If you have the capacity, documenting the other options would be great, yes, otherwise I'll get to it eventually 🙂 |
|
I've skipped a few fields, most of them are really self-explanatory, but I couldn't figure out |


It reads config from only three locations, config, .config nad pyproject. I felt that five locations is more suitable for mature project for compatibility, but I can change it.
Not sure about documentation tho, griffe config doesn't seem documented at all.