Get device location by telephony (SIM card) or settings without using GPS tracker.

Overview

react-native-device-country

Get device location by telephony (SIM card) or settings without using GPS tracker

npm version npm MIT
Platform - Android Platform - iOS

Installation

yarn add react-native-device-country

or

npm install react-native-device-country

Don't forget to run pod install after that!

Usage

import DeviceCountry, {
  TYPE_ANY,
  TYPE_TELEPHONY,
  TYPE_CONFIGURATION,
} from 'react-native-device-country';

// ...

DeviceCountry.getCountryCode()
  .then((result) => {
    console.log(result);
    // {"code": "BY", "type": "telephony"}
  })
  .catch((e) => {
    console.log(e);
  });

You can use spicific method for getting country

TYPE_TELEPHONY for getting country code from SIM card

DeviceCountry.getCountryCode(TYPE_TELEPHONY)
  .then((result) => {
    console.log(result);
    // {"code": "BY", "type": "telephony"}
  })
  .catch((e) => {
    console.log(e);
  });

or TYPE_CONFIGURATION for getting country code from phone location settings on iOS and phone language settings on Android

DeviceCountry.getCountryCode(TYPE_CONFIGURATION)
  .then((result) => {
    console.log(result);
    // {"code": "BY", "type": "config"}
  })
  .catch((e) => {
    console.log(e);
  });

TYPE_ANY will be used by default. It tries to use TYPE_TELEPHONY and fallbacks with TYPE_CONFIGURATION, if devive without SIM card.

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Comments
  • Switch config behaviour for new Flake8 v3 API

    Switch config behaviour for new Flake8 v3 API

    This addresses #13.

    opened by danpalmer 15
  • flake8-isort reports several import warnings without any reason

    flake8-isort reports several import warnings without any reason

    Hey there, I have these import statements at the top of my module:

    
    import os
    
    from flask import Blueprint, abort, current_app, jsonify
    from flask.views import MethodView
    from webargs import fields, missing
    from webargs.flaskparser import use_kwargs
    from werkzeug.utils import secure_filename
    
    from tcst_api.models.data import DataContract, DataFile
    from tcst_api.schemas.data import DataContractSchema, DataFileSchema
    

    When I run flake8-isort on the file I get the following output:

    tcst_api/views/data.py:2:1: I001 isort found an import in the wrong position
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    

    Which is kinda meaningless and seems to be broken. However if I run isort on the same content I get no errors as expected.

    I'm using the following flake8 and isort versions:

    flake8 - 3.5.0
    flake8-isort - 2.3
    isort - 4.3.4
    

    Can you please help me with this?

    opened by Kamforka 14
  • Support for pyproject.toml

    Support for pyproject.toml

    isort added support for using a pyproject.toml file for it's configuration in version 4.3.5. It would be great if this module could be compatible.

    opened by Dekker1 14
  • Support isort5

    Support isort5

    Hi,

    This PR adds support for isort >=5 while retaining the code for isort 4.

    The new code parses the unified diff output produced by isort.api.check_file and isort.api.check_code_string.

    isort5 only reads one config file and uses a specific order. So the tests need their own temporary dir each. So I started to rewrite the tests and because the self.assertEqual() calls in the unit tests made it hard to debug, I moved everything to pytest fixtures.

    Pytest is used by the CI anyway.

    I started to work on a PR to support isort 5 before I saw https://github.com/gforcada/flake8-isort/issues/88#issuecomment-657172965, but I think it is the same approach. Please review.

    Fixes #88

    opened by bnavigator 12
  • No error outputted in flake8 >= 3.1.0

    No error outputted in flake8 >= 3.1.0

    I just installed this extension but there is no error output for any of the files that fail isort. I added a print statement before the yield so the config is fine and it is getting the error from isort but seems to not be passed along or displayed by flake8.

    $ flake8 --version
    3.2.0 (pyflakes: 1.3.0, flake8_isort: 2.0, mccabe: 0.5.2, pycodestyle: 2.2.0) CPython 2.7.12 on Linux
    
    opened by cas-- 11
  • Adds isort output to each warning

    Adds isort output to each warning

    This PR introduces new warning output style. It now includes isort diff with how to fix your warning.

    Works the same way as pytest-isort.

    Problem (multiple spaces):

    import   os
    

    Old warning:

    flake8_isort.py:7:1: I001 isort found an import in the wrong position
    flake8_isort.py:7:7: E271 multiple spaces after keyword
    

    New warning:

    flake8_isort.py:7:1: I001 isort found an import in the wrong position
    
     from os.path import expanduser
     from testfixtures import OutputCapture
     
    -import   os
    +import os
     
     
     try:
    
    flake8_isort.py:7:7: E271 multiple spaces after keyword
    

    Closes #60

    opened by sobolevn 10
  • Not working with isort new release v5.0.0

    Not working with isort new release v5.0.0

    Hi,

    I'm using flake8-isort plugin in my projects and since isort released the new version, v5.0.0, the plugin stopped working. Here is the log with traceback:

    Traceback (most recent call last):
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/plugins/manager.py", line 157, in load_plugin
        self._load()
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/plugins/manager.py", line 134, in _load
        self._plugin = self.entry_point.load()
      File "/app/.tox/lint/lib/python3.6/site-packages/importlib_metadata/__init__.py", line 105, in load
        module = import_module(match.group('module'))
      File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 994, in _gcd_import
      File "<frozen importlib._bootstrap>", line 971, in _find_and_load
      File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 678, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8_isort.py", line 3, in <module>
        from isort import SortImports
    ImportError: cannot import name 'SortImports'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/app/.tox/lint/bin/flake8", line 8, in <module>
        sys.exit(main())
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/main/cli.py", line 22, in main
        app.run(argv)
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/main/application.py", line 360, in run
        self._run(argv)
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/main/application.py", line 347, in _run
        self.initialize(argv)
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/main/application.py", line 328, in initialize
        self.find_plugins(config_finder)
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/main/application.py", line 159, in find_plugins
        self.check_plugins.load_plugins()
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/plugins/manager.py", line 415, in load_plugins
        plugins = list(self.manager.map(load_plugin))
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/plugins/manager.py", line 302, in map
        yield func(self.plugins[name], *args, **kwargs)
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/plugins/manager.py", line 413, in load_plugin
        return plugin.load_plugin()
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/plugins/manager.py", line 164, in load_plugin
        raise failed_to_load
    flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "I00" due to cannot import name 'SortImports'.
    
    opened by srtab 10
  • Location of .isort.cfg

    Location of .isort.cfg

    I am not sure where or how to fix it, but I found out that .isort.cfg is not looked for recursively. It gets looked up in cwd and in the home directory. Right now I need to put an .isort.cfg in my project directory, because there I start vim and it looks at cwd. Then I need to symlink the .isort.cfg to src/package_name, because this is the cwd when this plugin gets called

    opened by do3cc 8
  • No configuration found when is used with git hook

    No configuration found when is used with git hook

    Files with changes are moved to a temporal directory when flake8 git hook is used.

    $ flake8 --install-hook git

    flake8-isort should look for configuration files in the current directory while checking the files in the temporary directory.

    Before fix, no configuration is found.

    $ git commit -m "Commit message" script.py:0:1: I002 no configuration found (.isort.cfg or [isort] on setup.cfg)

    After fix, project configuration is found.

    $ git commit -m "Commit message" script.py:1:1: D200 One-line docstring should fit on one line with quotes

    opened by sergio-alonso 8
  • exception on empty __init__.py files

    exception on empty __init__.py files

    On version 2.1.0 and 2.1.1, empty __init__.py files triggers an exception.

    $ > __init__.py
    $ flake8 __init__.py
    Process Process-1:
    Traceback (most recent call last):
      File "/Users/mnencia/.pyenv/versions/2.7.12/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
        self.run()
      File "/Users/mnencia/.pyenv/versions/2.7.12/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 114, in run
        self._target(*self._args, **self._kwargs)
      File "/Users/mnencia/.pyenv/versions/2.7.12/envs/test/lib/python2.7/site-packages/flake8/checker.py", line 666, in _run_checks_from_queue
        checker.run_checks(results_queue, statistics_queue)
      File "/Users/mnencia/.pyenv/versions/2.7.12/envs/test/lib/python2.7/site-packages/flake8/checker.py", line 606, in run_checks
        self.run_ast_checks()
      File "/Users/mnencia/.pyenv/versions/2.7.12/envs/test/lib/python2.7/site-packages/flake8/checker.py", line 517, in run_ast_checks
        for (line_number, offset, text, check) in runner:
      File "/Users/mnencia/.pyenv/versions/2.7.12/envs/test/lib/python2.7/site-packages/flake8_isort.py", line 70, in run
        for line_num, message in self.sortimports_linenum_msg(sort_result):
      File "/Users/mnencia/.pyenv/versions/2.7.12/envs/test/lib/python2.7/site-packages/flake8_isort.py", line 116, in sortimports_linenum_msg
        self._fixup_sortimports_wrapped(sort_result)
      File "/Users/mnencia/.pyenv/versions/2.7.12/envs/test/lib/python2.7/site-packages/flake8_isort.py", line 172, in _fixup_sortimports_wrapped
        for idx, line in enumerate(sort_imports.out_lines):
    AttributeError: 'SortImports' object has no attribute 'out_lines'
    

    On 2.0.3 it works as expected.

    Empty files with a different name don't trigger the error.

    bug 
    opened by mnencia 8
  • --isort-show-traceback: only show the traceback once per file

    --isort-show-traceback: only show the traceback once per file

    This PR is an experiment in ergonomics of flake8 output with the --isort-show-traceback option.

    At the moment the full traceback is printed with each message emitted. When I'm running flake8 on the command line this leads to very verbose output.

    This PR changes that behaviour so that the traceback is printed only once with the last message of the file.

    Feel free to throw this away if you prefer the existing behaviour; while this change is nicer for me I can imagine there are situations where repeating the traceback with every message might be desirable.

    opened by davidhewitt 0
  • Not working with isort 5

    Not working with isort 5

    If you update isort to the latest version, which is required to use --profile, this plugin breaks:

    Traceback (most recent call last):
      File "C:\Users\Kende\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\flake8\plugins\manager.py", line 157, in load_plugin
        self._load()
      File "C:\Users\Kende\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\flake8\plugins\manager.py", line 134, in _load
        self._plugin = self.entry_point.load()
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.240.0_x64__qbz5n2kfra8p0\lib\importlib\metadata.py", line 77, in load
        module = import_module(match.group('module'))
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.240.0_x64__qbz5n2kfra8p0\lib\importlib\__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
      File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 790, in exec_module
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "C:\Users\Kende\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\flake8_isort.py", line 3, in <module>
        from isort import SortImports
    ImportError: cannot import name 'SortImports' from 'isort' (C:\Users\Kende\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\isort\__init__.py)
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.240.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 197, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.240.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "C:\Users\Kende\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\flake8\__main__.py", line 4, in <module>
        cli.main()
      File "C:\Users\Kende\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\flake8\main\cli.py", line 22, in main
        app.run(argv)
      File "C:\Users\Kende\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\flake8\main\application.py", line 363, in run
        self._run(argv)
      File "C:\Users\Kende\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\flake8\main\application.py", line 350, in _run
        self.initialize(argv)
      File "C:\Users\Kende\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\flake8\main\application.py", line 330, in initialize
        self.find_plugins(config_finder)
      File "C:\Users\Kende\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\flake8\main\application.py", line 159, in find_plugins
        self.check_plugins.load_plugins()
      File "C:\Users\Kende\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\flake8\plugins\manager.py", line 415, in load_plugins
        plugins = list(self.manager.map(load_plugin))
      File "C:\Users\Kende\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\flake8\plugins\manager.py", line 302, in map
        yield func(self.plugins[name], *args, **kwargs)
      File "C:\Users\Kende\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\flake8\plugins\manager.py", line 413, in load_plugin
        return plugin.load_plugin()
      File "C:\Users\Kende\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\flake8\plugins\manager.py", line 164, in load_plugin
        raise failed_to_load
    flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "I00" due to cannot import name 'SortImports' from 'isort' (C:\Users\Kende\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\isort\__init__.py).
    

    When you downgrade it again it works.

    opened by KTibow 0
  • Not working with flake8

    Not working with flake8

    In a project I'm working on (can provide link if you need it) we have a pipeline setup to run flake8, but flake8-isort doesn't seem to run correctly as it doesn't detect isort failures. Running isort only works fine, so I guess its the plugin :smile:

    Isort config (.isort.cfg)

    [settings]
    profile = black
    force_single_line = true
    

    Flake8 config (.flake8)

    [flake8]
    count = true
    
    ignore =
        A002,      # Argument is shadowing a python builtin.
        A003,      # Class attribute is shadowing a python builtin.
        CFQ002,    # Function has too many arguments.
        D102,      # Missing docstring in public method.
        D105,      # Magic methods not having a docstring.
        D412,      # No blank lines allowed between a section header and its content
        E402,      # Module level import not at top of file (isn't compatible with our import style).
        IFSTMT001  # "use a oneliner here".
        T101,      # TO-DO comment detection (T102 is FIX-ME and T103 is XXX).
        W503,      # line break before binary operator.
        W504,      # line break before binary operator (again, I guess).
        S101,      # Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
    
    # F401: unused import.
    # F403: cannot detect unused vars if we use starred import
    # FS003: f-string missing prefix.
    # R102: unnecessary parenthesis on raised exception (raises false positives in places)
    # S106: posible hardcoded password (we dont care about this in the tests)
    # D106, D104, D103, D101, D100: Missing docstring in public function/class/module (ignore in tests)
    per-file-ignores =
        hikari/__init__.py:              F401,F403
        hikari/events/__init__.py:       F401,F403
        hikari/utilities/routes.py:      FS003
        hikari/utilities/date.py:        FS003
        hikari/impl/stateless_cache.py:  R102
        tests/hikari/*:                  FS003,S106,D106,D104,D103,D101,D100
    
    max-complexity = 20
    # TODO reset to 100 again if possible.
    max-function-length = 130
    # Technically this is 120, but black has a policy of "1 or 2 over is fine if it is tidier", so we have to raise this.
    max-line-length = 130
    show_source = False
    statistics = False
    
    accept-encodings = utf-8
    docstring-convention = numpy
    

    Flake8 plugins

    # Android support
    #flake8==3.8.3
    git+https://gitlab.com/PyCQA/flake8@master
    
    # Plugins
    # Ref: https://github.com/DmytroLitvinov/awesome-flake8-extensions
    
    flake8-bandit~=2.1.2                    # runs bandit
    flake8-black==0.2.1                     # runs black
    flake8-broken-line==0.2.1               # forbey "\" linebreaks
    flake8-builtins==1.5.3                  # builtin shadowing checks
    flake8-coding==1.3.2                    # coding magic-comment detectiong
    flake8-comprehensions==3.2.3            # comprehension checks
    flake8-deprecated==1.3                  # deprecated call checks
    flake8-docstrings==1.5.0                # pydocstyle support
    flake8-executable==2.0.4                # shebangs
    flake8-fixme==1.1.1                     # "fix me" counter
    flake8-functions==0.0.4                 # function linting
    flake8-html==0.4.1                      # html output
    flake8-if-statements==0.1.0             # condition linting
    flake8-isort==4.0.0                     # runs isort
    isort==5.5.2
    flake8_formatter_junit_xml==0.0.6       # junit
    flake8-mutable==1.2.0                   # mutable default argument detection
    flake8-pep3101==1.3.0                   # new-style format strings only
    flake8-print==3.1.4                     # complain about print statements in code
    flake8-printf-formatting==1.1.0         # forbey printf-style python2 string formatting
    flake8-pytest-style==1.3.0              # pytest checks
    flake8-raise==0.0.5                     # exception raising linting
    flake8-use-fstring==1.1                 # format string checking
    
    opened by davfsa 2
  • Use max-line-length setting from flake8

    Use max-line-length setting from flake8

    In one of my files I have an import line that with a recent commit exceeded the length of 79 (the default line length in isort).

    For some reason, in my local environment (with virtualenv) flake8 did not report any errors. However, my CI pipeline failed during the linting step/check reporting an error on the above mentioned line. After lots of digging I figured out that this is due to exceeding the max line length (e.g., running isort in the Docker container that is used by the CI pipeline wrapped the imported classes in parentheses over multiple lines).

    Is there a reason why inconsistent results could be produced in this case?

    Adding line_length = n to my config file fixed this problem. Ideally, I feel that flake8-isort should use the max-line-length setting from flake8 and pass it to isort.

    opened by mschoettle 2
  • Honor flake8's own --config parameter

    Honor flake8's own --config parameter

    In reference to #42

    Within parse_options, options.config should be the command-line parameter received by flake8 itself. Once you have that, it's just matter of giving it proper priority.

    Note that this quick implementation does not check if the provided file actually contains a valid configuration. While thinking about it, I'm not certain whether that should be an immediate error, or whether it should keep looking for a valid configuration elsewhere...

    opened by SwampFalc 5
  • Add `settings-path` option support

    Add `settings-path` option support

    There's an awesome setting for the isort that I use quite frequently in my setup: settings-path. It allows to specify the desired configuration path.

    Could I please add a support for this option to this library? I really miss it, and it won't interfere with nay other options.

    That's how I think it should work:

    1. If --no-isort-config is passed, then we ignore all other steps and use the default options 0.1 We can also raise an exception if both --no-isort-config and --isort-settings-path are passed 0.2 We can just ignore the --isort-settings-path
    2. If this option is passed - then try to read this file. I have two options in case this file does not exist or can not be red: 1.1 We can raise an exception. All flake8 check will fail with this exception. This will help to indicate about the problem early 1.2 Just fallback to the config finding behavior in case this file is missing
    3. If no options are passed we should fallback to the config finding logic

    @gforcada What do you think?

    I personally prefer explicit exceptions. As they indicate about the problem. And not hiding it.

    opened by sobolevn 1
  • Use command line params of flake8

    Use command line params of flake8

    I execute flake8 with the command line param --max-line-length=120. It would be cool if that param is also passed to isort.

    The other interesting flake8 cli param is --config. My team has linting configurations for all projects. With flake8 I can reference to that files by using the --config param. You support already a setup.cfg so it would be nice to use the same as the one, used by flake8.

    opened by Xenya0815 1
  • Inconsistent behaviour to isort

    Inconsistent behaviour to isort

    Hi,

    for some strange reason I get inconsistent results by running flake8 with flake8-isort installed and running isort directly. The issue arises with these imports:#

    from _pydecimal import Decimal, DecimalException
    
    from django import forms
    from django.core.exceptions import ValidationError
    

    isort is fine with that. But flake8 gives me:

    ./fields.py:1:1: I001 isort found an import in the wrong position
    ./fields.py:2:1: I004 isort found an unexpected blank line in imports
    ./fields.py:5:1: I003 isort expected 1 blank line in imports, found 0
    

    This is my setup.cfg

    [isort]
    line_length=120
    default_section = THIRDPARTY
    known_django = django
    sections = STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
    
    opened by larsrinn 5
  • Cannot use same config file as flake8 config file

    Cannot use same config file as flake8 config file

    I'm trying to use flake8 --config=config.cfg

    in config.cfg, I have an [isort] section:

    [isort]
    line_length=100
    indent='    '
    multi_line_output=0
    length_sort=1
    sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
    import_heading_stdlib=Stdlib
    import_heading_thirdparty=External Libraries
    import_heading_firstparty=Snekchek
    

    yet I keep getting messages like this: ./setup.py:0:1: I002 no configuration found (.isort.cfg or [isort] in configs)

    opened by martmists-gh 2
Owner
dev.family
We develop complex services and solutions for startups
dev.family
React Native plugin to manage Sim card(s) & eSim

react-native-sim-cards-manager A new library that merge multiple sim cards libraries into a single one: https://github.com/markneh/react-native-esim h

@odemolliens 11 Jan 3, 2023
The clickgui used in my Minecraft Hacked Client, Ozone. Uses HeroCode Settings but can easily be migrated to another settings system.

OzoneClickGUI The clickgui used in my Minecraft Hacked Client, Ozone. Uses HeroCode Settings but can easily be migrated to another settings system. Pl

ShadeDev 9 Dec 2, 2022
trying to create a plugin using the spigot api! this plugin will be responsible for delivering the products according to the settings!

KettraShop "simples plugin de ativação de produtos da loja, dentro do Minecraft" ⚙️ Configurações caso você não tenha uma loja virtual para seu servid

SEBASTIAN JN ฅ^•ﻌ•^ฅ 4 Nov 2, 2022
Task tracker application

TaskManager Three-level project architecture (data layer, domain layer, representation layer) with an additional layer linking the representation laye

Yaroslav Novichkov 1 Feb 4, 2022
A free opensource domain tracker with a breakdown of which countries players connected with for each domain versions 1.13+

A free opensource domain tracker with a breakdown of which countries players connected with for each domain versions 1.13+

Ricky Lafleur 8 Aug 4, 2022
Dual Camera, IMU, and GPS data recorder for Android

Visual-Inertial Recorder (VIRec) Record camera frames at ~30fps from one or two camera sensors, Inertial Measurement Unit (IMU) measurements at ~100Hz

AUT 3D Vision 17 Oct 24, 2022
Data extraction from smartphones and GPS and Accelerometer data "fusion" with Kalman filter.

This is library for GPS and Accelerometer data "fusion" with Kalman filter. All code is written in Java. It helps to increase position accuracy and GP

Rahul Goel 4 Nov 22, 2022
This project uses the artificial potential field method to realize the path planning of the robot, and completes the trajectory optimization through other settings. It can also be combined with laser SLAM, target recognition and other technologies for path planning.

FRCAutoDriver 项目说明 Project Instruction 本项目利用人工势场法,实现机器人的路径规划,并通过其他设置完成轨迹优化,还可以结合激光SLAM、目标识别等技术进行路径规划 This project uses the artificial potential field

ZhangzrJerry 2 Sep 9, 2022
An API Library that provides the functionality to access, manage and store device topologies found in JSON files using Java and Maven Framework

Topology API ?? About An API library which provides the functionality to access, manage and store device topologies. ?? Description Read a topology fr

Abdelrahman Hamdy 2 Aug 4, 2022
Cardsystem - Digital card sign-in/sign-out system for the Indiana Academy

cardsystem Digital card sign-in/sign-out system for the Indiana Academy Requirements: Create system for inputing destination, companion, and estimated

null 1 Feb 23, 2022
A simple Flash Card application to assist in learning and remembering something.

a-flash-deck A simple Flash Card application to assist in learning and remembering something. This project is intended for demo app for a-navigator an

null 16 Dec 30, 2022
A multi-ride amusement park ticket application on NFC memory card

A multi-ride amusement park ticket application on NFC memory card. The security features cover mitigating: Man in the Middle attack, Rollback attack, tearing protection, Write Protection.

Jayshree Rathi 1 Nov 28, 2022
Android library that allows you to determine your location in a few of lines!

locsimple Android library that allows you to determine your location in some lines! Benefits: automatic processing of permissions processing of enabli

Dmitry 7 Aug 31, 2022
An unofficial rules engine for the world's greatest card game.

Forge Official repo. Dev instructions here: Getting Started (Somewhat outdated) Discord channel here Requirements / Tools you favourite Java IDE (Inte

Forge 150 Dec 30, 2022
The goal of the project is to create a web application using Java EE and database (PostgreSQL) without connecting a modern technology stack like spring boot and hibernate

About The Project SignIn page SignUp page Profile page The goal of the project is to create a web application using Java EE and database (PostgreSQL)

Islam Khabibullin 2 Mar 23, 2022
On-device wake word detection powered by deep learning.

Porcupine Made in Vancouver, Canada by Picovoice Porcupine is a highly-accurate and lightweight wake word engine. It enables building always-listening

Picovoice 2.8k Jan 7, 2023
Unified Device Tree for Realme X3 series

Unified Device Tree for Realme X3 series The realme X3 (codenamed "RMX2081", "RMX2083") is a high-end smartphone from realme. It was announced and rel

Adithya 5 May 5, 2022
On-device, Offline Spleeter Solution For Mobile

Spleeter for Mobile On-device, Offline Spleeter Solution For Android & iOS Spleeter is Deezer source separation library with pretrained models written

FaceOnLive 235 Dec 24, 2022
Official React Native client for FingerprintJS PRO. 100% accurate device identification for fraud detection.

FingerprintJS PRO React Native Official React Native module for 100% accurate device identification, created for the FingerprintJS Pro Server API. Thi

FingerprintJS 26 Nov 22, 2022