diff options
author | Shubham Saini <shubham6405@gmail.com> | 2019-08-05 08:32:33 +0000 |
---|---|---|
committer | Shubham Saini <shubham6405@gmail.com> | 2019-08-05 08:32:33 +0000 |
commit | 227b2d30a8675b44918f9d9ca89b24144a938215 (patch) | |
tree | 9f8e6a28724514b6fdf463a9ab2067a7ef309b72 /venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/chardet/__init__.py | |
parent | 842a8cfbbbdb1f92889d892e4859dbd5d40c5be8 (diff) |
removing venv files
Diffstat (limited to 'venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/chardet/__init__.py')
-rw-r--r-- | venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/chardet/__init__.py | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/chardet/__init__.py b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/chardet/__init__.py deleted file mode 100644 index 45bf7e6..0000000 --- a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/chardet/__init__.py +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | ######################## BEGIN LICENSE BLOCK ######################## | ||
2 | # This library is free software; you can redistribute it and/or | ||
3 | # modify it under the terms of the GNU Lesser General Public | ||
4 | # License as published by the Free Software Foundation; either | ||
5 | # version 2.1 of the License, or (at your option) any later version. | ||
6 | # | ||
7 | # This library is distributed in the hope that it will be useful, | ||
8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
10 | # Lesser General Public License for more details. | ||
11 | # | ||
12 | # You should have received a copy of the GNU Lesser General Public | ||
13 | # License along with this library; if not, write to the Free Software | ||
14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
15 | # 02110-1301 USA | ||
16 | ######################### END LICENSE BLOCK ######################### | ||
17 | |||
18 | |||
19 | from .compat import PY2, PY3 | ||
20 | from .universaldetector import UniversalDetector | ||
21 | from .version import __version__, VERSION | ||
22 | |||
23 | |||
24 | def detect(byte_str): | ||
25 | """ | ||
26 | Detect the encoding of the given byte string. | ||
27 | |||
28 | :param byte_str: The byte sequence to examine. | ||
29 | :type byte_str: ``bytes`` or ``bytearray`` | ||
30 | """ | ||
31 | if not isinstance(byte_str, bytearray): | ||
32 | if not isinstance(byte_str, bytes): | ||
33 | raise TypeError('Expected object of type bytes or bytearray, got: ' | ||
34 | '{0}'.format(type(byte_str))) | ||
35 | else: | ||
36 | byte_str = bytearray(byte_str) | ||
37 | detector = UniversalDetector() | ||
38 | detector.feed(byte_str) | ||
39 | return detector.close() | ||