Flagged by PyCharm.
Details
Details
- Reviewers
pulkit - Group Reviewers
hg-reviewers - Commits
- rHG3622f4fafd35: fsmonitor: drop an unused local variable
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
pulkit |
hg-reviewers |
Flagged by PyCharm.
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | hgext/fsmonitor/pywatchman/capabilities.py (2 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
4cf3a10b4d97 | 8aa4b2cd4662 | Matt Harbison | Dec 27 2019, 5:54 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 |
def synthesize(vers, opts): | def synthesize(vers, opts): | ||||
""" Synthesize a capability enabled version response | """ Synthesize a capability enabled version response | ||||
This is a very limited emulation for relatively recent feature sets | This is a very limited emulation for relatively recent feature sets | ||||
""" | """ | ||||
parsed_version = parse_version(vers["version"]) | parsed_version = parse_version(vers["version"]) | ||||
vers["capabilities"] = {} | vers["capabilities"] = {} | ||||
for name in opts["optional"]: | for name in opts["optional"]: | ||||
vers["capabilities"][name] = check(parsed_version, name) | vers["capabilities"][name] = check(parsed_version, name) | ||||
failed = False # noqa: F841 T25377293 Grandfathered in | |||||
for name in opts["required"]: | for name in opts["required"]: | ||||
have = check(parsed_version, name) | have = check(parsed_version, name) | ||||
vers["capabilities"][name] = have | vers["capabilities"][name] = have | ||||
if not have: | if not have: | ||||
vers["error"] = ( | vers["error"] = ( | ||||
"client required capability `" | "client required capability `" | ||||
+ name | + name | ||||
+ "` is not supported by this server" | + "` is not supported by this server" | ||||
) | ) | ||||
return vers | return vers |