-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Full typing for scrapy/contracts. #6371
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6371 +/- ##
==========================================
+ Coverage 85.00% 88.98% +3.97%
==========================================
Files 161 162 +1
Lines 11962 12115 +153
Branches 1872 1725 -147
==========================================
+ Hits 10168 10780 +612
+ Misses 1512 1016 -496
- Partials 282 319 +37
|
for line in method.__doc__.split("\n"): | ||
line = line.strip() | ||
|
||
if line.startswith("@"): | ||
name, args = re.match(r"@(\w+)\s*(.*)", line).groups() | ||
m = re.match(r"@(\w+)\s*(.*)", line) | ||
assert m is not None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be None
, though. Should we open a ticket to update it, e.g. to raise an exception about an invalid contract line being found?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wRAR @Gallaecio Should we raise an exception or just pass the unmatched regex using continue
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I said in #6383, "I think we should just skip lines that don't match."
No description provided.