semvec/pypi-packages huggingface dataset:
flake8-local-import 1.0.6
Python 3 check local import for flake8
License: MIT

# flake8-local-import
[![Downloads](https://pepy.tech/badge/flake8-local-import/month)](https://pepy.tech/project/flake8-local-import)
![PyPI](https://img.shields.io/pypi/v/flake8-local-import)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/flake8-local-import)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/flake8-local-import)
![PyPI - Implementation](https://img.shields.io/pypi/implementation/flake8-local-import)

Python 3 check local import for flake8

# Installation

```bash
pip install flake8-local-import
```

# Configuration

You will want to set the `app-import-names` option to a comma separated
list of names that should be considered local to your application. Note that
relative imports are always considered local.


# Example

```python3
#  Error
def func():
    statement

    from app_package import A   # LI100 Local import must be at the beginning of the method body


#  Error
def func():
    statement

    from app_package import A   # LI100 Local import must be at the beginning of the method body


# Good
def func():
    from app_package import A

    statement

```


# Error codes

|code|description|
|---|---|
|LI100|Local import must be at the beginning of the method body|
|LI101|Packages from external modules should not be imported locally|
|LI102|Packages from standard modules should not be imported locally|


# Links

https://github.com/meanmail-dev/flake8-local-import

https://meanmail.dev/
similar-documents 0.1.4
Generate similarity scores for documents from cli
License: MIT
Requires Python: >=3.7
Keywords: similar,documents

# similar-documents

Generates similarity document scores from cli. Useful when combined with static site generators.

```
$ similar-documents -h
usage: $ similar_documents -o result.json -k 5 -t japanese *.md
       $ similar_documents -h

positional arguments:
  documents             list[str]

optional arguments:
  -h, --help            show this help message and exit
  -o None, --output-file None
                        Optional: write output file (default STDOUT)
  -k 5, --top-k 5       Number of similar documents
  -d, --debug           Show debug messages
  -t None, --tokenizer None
                        tokenizer [japanese] (default None(space splitting))
  -e utf-8, --encoding utf-8
                        file encoding(default utf-8)
```

```
$ similar-documents -t japanese -k 2 /data/markdowns/recently/*.md | jq . | head -20
{
  "/data/markdowns/recently/2021-04-01.md": [
    [
      "/data/markdowns/recently/2021-04-26.md",
      0.3123780045484529
    ],
    [
      "/data/markdowns/recently/2021-04-03.md",
      0.17384380113610887
    ]
  ],
  "/data/markdowns/recently/2021-04-02.md": [
    [
      "/data/markdowns/recently/2021-04-26.md",
      0.10715535963136594
    ],
    [
      "/data/markdowns/recently/2021-04-23.md",
      0.09411751563901728
    ]
```

## Installation

```
pip install -U similar-documents
```

### On Docker

```
$ docker build -t similar-doc .
# examples: run on windows
$ docker run -it -v C:\Users\yu1\Dropbox\secon-sites\data:/data/ --rm similar-doc bash -c 'similar-documents -t japanese -k 2 -o /data/result.json `ls /data/markdowns/*/*.md`'
```

## Lisence

MIT

## Author

- Yuichi Tateno