forked from graphql-python/graphql-core-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into origin/fix-enums
- Loading branch information
Showing
206 changed files
with
20,562 additions
and
11,932 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
repos: | ||
- repo: git://github.com/pre-commit/pre-commit-hooks | ||
rev: v1.3.0 | ||
hooks: | ||
- id: check-json | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
exclude: ^docs/.*$ | ||
- id: trailing-whitespace | ||
exclude: README.md | ||
- id: pretty-format-json | ||
args: | ||
- --autofix | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v1.4.0 | ||
hooks: | ||
- id: pyupgrade | ||
- repo: https://github.com/ambv/black | ||
rev: 18.6b4 | ||
hooks: | ||
- id: black | ||
language_version: python3.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Configuration for pytest to automatically collect types. | ||
# Thanks to Guilherme Salgado. | ||
import pytest | ||
|
||
try: | ||
import pyannotate_runtime | ||
|
||
PYANOTATE_PRESENT = True | ||
except ImportError: | ||
PYANOTATE_PRESENT = False | ||
|
||
if PYANOTATE_PRESENT: | ||
|
||
def pytest_collection_finish(session): | ||
"""Handle the pytest collection finish hook: configure pyannotate. | ||
Explicitly delay importing `collect_types` until all tests have | ||
been collected. This gives gevent a chance to monkey patch the | ||
world before importing pyannotate. | ||
""" | ||
from pyannotate_runtime import collect_types | ||
|
||
collect_types.init_types_collection() | ||
|
||
@pytest.fixture(autouse=True) | ||
def collect_types_fixture(): | ||
from pyannotate_runtime import collect_types | ||
|
||
collect_types.resume() | ||
yield | ||
collect_types.pause() | ||
|
||
def pytest_sessionfinish(session, exitstatus): | ||
from pyannotate_runtime import collect_types | ||
|
||
collect_types.dump_stats("type_info.json") |
Oops, something went wrong.