Skip to content

Commit 841fbdb

Browse files
committed
Initial commit
0 parents  commit 841fbdb

30 files changed

+1172
-0
lines changed

.appveyor.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
skip_tags: true
2+
3+
os: Visual Studio 2015
4+
5+
environment:
6+
matrix:
7+
- PYTHON: "C:\\Python35"
8+
- PYTHON: "C:\\Python35-x64"
9+
- PYTHON: "C:\\Python36"
10+
- PYTHON: "C:\\Python36-x64"
11+
12+
build_script:
13+
- "git --no-pager log -n2"
14+
- "echo %APPVEYOR_REPO_COMMIT%"
15+
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;;%PATH%"
16+
- "python --version"
17+
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
18+
- "pip install ."
19+
- "pip install -Ur test-requirements.txt"
20+
- "pip install codecov"
21+
22+
test_script:
23+
- "mkdir empty"
24+
- "cd empty"
25+
# Make sure it's being imported from where we expect
26+
- "python -c \"import os, sniffio; print(os.path.dirname(sniffio.__file__))\""
27+
- "python -u -m pytest -W error -ra -v -s --pyargs sniffio --cov=sniffio --cov-config=../.coveragerc"
28+
- "codecov"

.coveragerc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[run]
2+
branch=True
3+
source=sniffio
4+
5+
[report]
6+
precision = 1
7+
exclude_lines =
8+
pragma: no cover
9+
abc.abstractmethod

.gitignore

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Add any project-specific files here:
2+
3+
4+
# Sphinx docs
5+
docs/build/
6+
7+
# Byte-compiled / optimized / DLL files
8+
__pycache__/
9+
*.py[cod]
10+
*~
11+
\#*
12+
.#*
13+
14+
# C extensions
15+
*.so
16+
17+
# Distribution / packaging
18+
.Python
19+
/build/
20+
/develop-eggs/
21+
/dist/
22+
/eggs/
23+
/lib/
24+
/lib64/
25+
/parts/
26+
/sdist/
27+
/var/
28+
*.egg-info/
29+
.installed.cfg
30+
*.egg
31+
32+
# Installer logs
33+
pip-log.txt
34+
35+
# Unit test / coverage reports
36+
htmlcov/
37+
.tox/
38+
.coverage
39+
.coverage.*
40+
.cache
41+
nosetests.xml
42+
coverage.xml
43+
44+
# Translations
45+
*.mo
46+
47+
# Mr Developer
48+
.mr.developer.cfg
49+
.project
50+
.pydevproject
51+
52+
# Rope
53+
.ropeproject
54+
55+
# Django stuff:
56+
*.log
57+
*.pot

.readthedocs.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# https://docs.readthedocs.io/en/latest/yaml-config.html
2+
formats:
3+
- htmlzip
4+
- epub
5+
6+
requirements_file: ci/rtd-requirements.txt
7+
8+
# Currently RTD's default image only has 3.5
9+
# This gets us 3.6 (and hopefully 3.7 in the future)
10+
# https://docs.readthedocs.io/en/latest/yaml-config.html#build-image
11+
build:
12+
image: latest
13+
14+
python:
15+
version: 3
16+
pip_install: True

.style.yapf

+180
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
[style]
2+
# Align closing bracket with visual indentation.
3+
align_closing_bracket_with_visual_indent=True
4+
5+
# Allow dictionary keys to exist on multiple lines. For example:
6+
#
7+
# x = {
8+
# ('this is the first element of a tuple',
9+
# 'this is the second element of a tuple'):
10+
# value,
11+
# }
12+
allow_multiline_dictionary_keys=False
13+
14+
# Allow lambdas to be formatted on more than one line.
15+
allow_multiline_lambdas=False
16+
17+
# Insert a blank line before a class-level docstring.
18+
blank_line_before_class_docstring=False
19+
20+
# Insert a blank line before a 'def' or 'class' immediately nested
21+
# within another 'def' or 'class'. For example:
22+
#
23+
# class Foo:
24+
# # <------ this blank line
25+
# def method():
26+
# ...
27+
blank_line_before_nested_class_or_def=False
28+
29+
# Do not split consecutive brackets. Only relevant when
30+
# dedent_closing_brackets is set. For example:
31+
#
32+
# call_func_that_takes_a_dict(
33+
# {
34+
# 'key1': 'value1',
35+
# 'key2': 'value2',
36+
# }
37+
# )
38+
#
39+
# would reformat to:
40+
#
41+
# call_func_that_takes_a_dict({
42+
# 'key1': 'value1',
43+
# 'key2': 'value2',
44+
# })
45+
coalesce_brackets=False
46+
47+
# The column limit.
48+
column_limit=79
49+
50+
# Indent width used for line continuations.
51+
continuation_indent_width=4
52+
53+
# Put closing brackets on a separate line, dedented, if the bracketed
54+
# expression can't fit in a single line. Applies to all kinds of brackets,
55+
# including function definitions and calls. For example:
56+
#
57+
# config = {
58+
# 'key1': 'value1',
59+
# 'key2': 'value2',
60+
# } # <--- this bracket is dedented and on a separate line
61+
#
62+
# time_series = self.remote_client.query_entity_counters(
63+
# entity='dev3246.region1',
64+
# key='dns.query_latency_tcp',
65+
# transform=Transformation.AVERAGE(window=timedelta(seconds=60)),
66+
# start_ts=now()-timedelta(days=3),
67+
# end_ts=now(),
68+
# ) # <--- this bracket is dedented and on a separate line
69+
dedent_closing_brackets=True
70+
71+
# Place each dictionary entry onto its own line.
72+
each_dict_entry_on_separate_line=True
73+
74+
# The regex for an i18n comment. The presence of this comment stops
75+
# reformatting of that line, because the comments are required to be
76+
# next to the string they translate.
77+
i18n_comment=
78+
79+
# The i18n function call names. The presence of this function stops
80+
# reformattting on that line, because the string it has cannot be moved
81+
# away from the i18n comment.
82+
i18n_function_call=
83+
84+
# Indent the dictionary value if it cannot fit on the same line as the
85+
# dictionary key. For example:
86+
#
87+
# config = {
88+
# 'key1':
89+
# 'value1',
90+
# 'key2': value1 +
91+
# value2,
92+
# }
93+
indent_dictionary_value=True
94+
95+
# The number of columns to use for indentation.
96+
indent_width=4
97+
98+
# Join short lines into one line. E.g., single line 'if' statements.
99+
join_multiple_lines=False
100+
101+
# Use spaces around default or named assigns.
102+
spaces_around_default_or_named_assign=False
103+
104+
# Use spaces around the power operator.
105+
spaces_around_power_operator=False
106+
107+
# The number of spaces required before a trailing comment.
108+
spaces_before_comment=2
109+
110+
# Insert a space between the ending comma and closing bracket of a list,
111+
# etc.
112+
space_between_ending_comma_and_closing_bracket=False
113+
114+
# Split before arguments if the argument list is terminated by a
115+
# comma.
116+
split_arguments_when_comma_terminated=True
117+
118+
# Set to True to prefer splitting before '&', '|' or '^' rather than
119+
# after.
120+
split_before_bitwise_operator=True
121+
122+
# Split before a dictionary or set generator (comp_for). For example, note
123+
# the split before the 'for':
124+
#
125+
# foo = {
126+
# variable: 'Hello world, have a nice day!'
127+
# for variable in bar if variable != 42
128+
# }
129+
split_before_dict_set_generator=True
130+
131+
# If an argument / parameter list is going to be split, then split before
132+
# the first argument.
133+
split_before_first_argument=True
134+
135+
# Set to True to prefer splitting before 'and' or 'or' rather than
136+
# after.
137+
split_before_logical_operator=True
138+
139+
# Split named assignments onto individual lines.
140+
split_before_named_assigns=True
141+
142+
# The penalty for splitting right after the opening bracket.
143+
split_penalty_after_opening_bracket=30
144+
145+
# The penalty for splitting the line after a unary operator.
146+
split_penalty_after_unary_operator=10000
147+
148+
# The penalty for splitting right before an if expression.
149+
split_penalty_before_if_expr=0
150+
151+
# The penalty of splitting the line around the '&', '|', and '^'
152+
# operators.
153+
split_penalty_bitwise_operator=300
154+
155+
# The penalty for characters over the column limit.
156+
split_penalty_excess_character=4500
157+
158+
# The penalty incurred by adding a line split to the unwrapped line. The
159+
# more line splits added the higher the penalty.
160+
split_penalty_for_added_line_split=30
161+
162+
# The penalty of splitting a list of "import as" names. For example:
163+
#
164+
# from a_very_long_or_indented_module_name_yada_yad import (long_argument_1,
165+
# long_argument_2,
166+
# long_argument_3)
167+
#
168+
# would reformat to something like:
169+
#
170+
# from a_very_long_or_indented_module_name_yada_yad import (
171+
# long_argument_1, long_argument_2, long_argument_3)
172+
split_penalty_import_names=0
173+
174+
# The penalty of splitting the line around the 'and' and 'or'
175+
# operators.
176+
split_penalty_logical_operator=0
177+
178+
# Use the Tab character for indentation.
179+
use_tabs=False
180+

.travis.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
language: python
2+
sudo: false
3+
dist: trusty
4+
5+
matrix:
6+
include:
7+
# These are quick and often catch errors, so list them first
8+
- python: 3.6
9+
env: CHECK_DOCS=1
10+
- python: 3.6
11+
env: CHECK_FORMATTING=1
12+
# The pypy tests are slow, so list them early
13+
- python: pypy3.5
14+
# Uncomment if you want to test on pypy nightly:
15+
# - language: generic
16+
# env: USE_PYPY_NIGHTLY=1
17+
- python: 3.5.0
18+
- python: 3.5.2
19+
- python: 3.6
20+
# As of 2018-07-05, Travis's 3.7 and 3.8 builds only work if you
21+
# use dist: xenial AND sudo: required
22+
# See: https://github.com/python-trio/trio/pull/556#issuecomment-402879391
23+
- python: 3.7
24+
dist: xenial
25+
sudo: required
26+
- python: 3.8-dev
27+
dist: xenial
28+
sudo: required
29+
- os: osx
30+
language: generic
31+
env: MACPYTHON=3.5.4
32+
- os: osx
33+
language: generic
34+
env: MACPYTHON=3.6.6
35+
- os: osx
36+
language: generic
37+
env: MACPYTHON=3.7.0
38+
39+
script:
40+
- ci/travis.sh

0 commit comments

Comments
 (0)