Comments (6)
Yes I'm still using Python 3.12.0rc1, good catch! Will upgrade 🙂
from griffe.
I eventually made use of pysource_minimize
, thank you again for showing me how to use it 🙂
from griffe.
The SystemError
s seem to come from pysource_codegen
itself:
Failing case with seed 538993
Traceback (most recent call last):
File "/media/data/dev/griffe/duties.py", line 325, in test_seed
visit("module", filepath=Path("/tmp/module.py"), code=generate(seed))
^^^^^^^^^^^^^^
File "/media/data/dev/griffe/__pypackages__/3.12/lib/pysource_codegen/_codegen.py", line 930, in generate
tree = generator.generate(root_node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/data/dev/griffe/__pypackages__/3.12/lib/pysource_codegen/_codegen.py", line 886, in generate
result = fix(result, parents)
^^^^^^^^^^^^^^^^^^^^
File "/media/data/dev/griffe/__pypackages__/3.12/lib/pysource_codegen/_codegen.py", line 752, in fix
compile(code, "<string>", "exec", dont_inherit=True)
SystemError: compiler_lookup_arg(name='name_1') with reftype=3 failed in <generic parameters of name_0>; freevars of code name_0: ('.type_params', 'name_1', 'name_3', 'name_4')
We will ignore them for now.
from griffe.
Erm, it looks like I can't regenerate the same code when debugging through VSCode... 😮💨
from griffe.
Oh, OK, it actually depended on the Python version used.
from griffe.
Yes, it depends on the python version. Are you still using a 3.12 pre-release? This errors looking familiar to me. python/cpython#109219
I put an quick implementation together based on your tweet which finds some errors #216.
the pysource-minimize part is the important part here which gives you this nice small source codes.
Let me know how you want to integrate it.
You can also take it from here if you want.
from griffe.
Related Issues (20)
- bug: attempting to load external non-module alias triggers .resolve_target() HOT 2
- feat: Generate `__init__` methods for typed dicts with `**kwargs: Unpack[MyDict]` to help docstring parser fetch other parameters types HOT 7
- Adopt a shared specification for api structure HOT 1
- feature: A way to get docstrings, ... of InitVar parameters of a dataclass HOT 2
- bug: Type is missing, and default value is incorrect for class variable in a dataclass HOT 4
- feature: allow plugins to extend json output HOT 3
- bug: Enum members mis-labelled as instance attributes HOT 3
- feature: I'd like to be able to use `Docstring` without requiring `parent` but get no warning HOT 8
- bug: mkdocstrings filters option doesn't work anymore after upgrade to griffe 0.46.0 HOT 18
- bug: [regression 0.46] Does not find inherited methods HOT 4
- bug: Wrong alias target path when inspecting class, causing stubs-merging to fail silently HOT 20
- bug: Yields broken for properties HOT 1
- feature: Improve recognition of functions through assignments
- bug: `.pth` files generated by PyTorch are incompatible with path configuration file handling HOT 3
- bug: RecursionError: maximum recursion depth exceeded HOT 14
- bug: Pydantic dataclasses with extra args break parsing of the function signature HOT 7
- backports.strenum dependency missing in conda package HOT 7
- feature: stable `as_json` HOT 6
- bug: The `setter` and `deleter` attribute should be set on the `Attribute` class, since that's how properties are instantiated
- feature: Allow extensions to access the current agent (visitor/inspector) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from griffe.