Comments (4)
Works fine for me... (tested on Python 3.9 though)
from pyquotes.
Narrowed it down further, although I realize this is a PEP8 violation, it occurs if there is no new line and the last character is a closing quote. (Checked on Python 3.9 to match you)
from pyquotes.
OK, I'm inclined to say "garbage in, garbage out" (text/code files should ALWAYS contain a trailing linebreak), but if it's not a bug in parso but pyquotes and can be easily fixed I'll accept a PR for it.
from pyquotes.
Traceback (most recent call last):
File "C:\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Python39\Scripts\pyquotes.exe\__main__.py", line 7, in <module>
File "C:\Python39\lib\site-packages\click\core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "C:\Python39\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Python39\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Python39\lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Python39\lib\site-packages\pyquotes\cli.py", line 89, in main
changed = _process_file(file, config=config)
File "C:\Python39\lib\site-packages\pyquotes\cli.py", line 114, in _process_file
new_code = transform_source(old_code, double_quotes=config.double_quotes)
File "C:\Python39\lib\site-packages\pyquotes\transform.py", line 49, in transform_source
for is_doc, leaf in _iter_strings(tree):
File "C:\Python39\lib\site-packages\pyquotes\transform.py", line 42, in scan
yield from scan(node)
File "C:\Python39\lib\site-packages\pyquotes\transform.py", line 29, in scan
doc_node = parent.get_doc_node()
File "C:\Python39\lib\site-packages\parso\python\tree.py", line 86, in get_doc_node
c = simple_stmt.parent.children
AttributeError: 'NoneType' object has no attribute 'children'
This is the full stack trace, and confirmed it doesn't happen for example if the contents is print("Test")
without a newline.
from pyquotes.
Related Issues (3)
- click dependency not bounded HOT 2
- Encoding issue HOT 8
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 pyquotes.