semvec/pypi-packages huggingface dataset:
mo-black 22.364.23070
More Black! Denser Black formatting
License: MIT


# More Black! - Denser Black formatting

This is s a fork of [the Black code formatter](https://github.com/psf/black)

### Requires Python 3.7

The old version of Black depends on a number of binaries, each particular to Python 3.7. 

### Problem

I love Black formatting because I agree with its formatting choices, but it does have one pathology: [Excessive indenting on data structures](https://github.com/psf/black/issues/626)

Here is an example of Black formatting; many lines are wasted on lonely brackets:  

```python
my_method(
    [
        {
            "name": "a",
            "value": 42
        }
    ]
)
```

## Solution: More Black!

When there is only one property (or list item, or parameter), then do not make a new line.

```python
my_method([{
    "name": "a",
    "value": 42
}])
```


## Usage

Please [read the official Black documentation at time of fork](https://github.com/psf/black/blob/537ea8df35b1004bdb228b483907fb5dd92e5257/README.md#usage)

    pip install mo-black


## More about this fork

The `right_hand_split()` function has [additional code](https://github.com/klahnakoski/mo-black/blob/25e1fd648530279dffbf701721df76d52213651a/src/black/__init__.py#L4786) that attempts to identify "simple" structures inside brackets. If it is simple, then block the multiline formatting and, recurse into deeper brackets to find something more complicated to split.

## Development



Be sure you are in the `mo-black` main directory

Setup virtual environment

    python -m venv .venv
    source .venv/bin/activate

Install requirements 

    pip-compile --output-file=packaging/requirements.txt packaging/requirements.in
    pip install -r packaging/requirements.txt
    pip install -r tests/requirements.txt

Set some environment variables

    export PYTHONPATH=.

Run the tests 

    python -m unittest tests/test_black.py

Here is the same for Windows...

    c:\Python38\python -m pip install virtualenv
    c:\Python38\python -m virtualenv .venv             
    .venv\Scripts\activate
    pip install -r packaging\requirements.txt
    pip install -r tests\requirements.txt
    set PYTHONPATH=.
    python -m unittest tests\test_black.py


### Development Installation

You can install `mo-black` from the main directory

    python.exe -m pip install .
watchmap-sdk 0.1.0
A Python package to watch a directory and map its contents to a dictionary.
License: MIT

# watchmap
A simple service to map microservices and API endpoints to create a dependency graph. Built over Express.js and utilizes express middlewares/request API.

The High Level Design

1. Middleware (implimented as an sdk) acts as live watcher for the incoming request to an API of a particular microservice from the concerned macroservice.
2. The watchmap server runs as a next.js application which recieves anlytics logs from middleware to process the API dependency graph.
3. The analytics dashboard and watchmap server make up as next app, the analytics dashboard provide visual presentation of API dependency graph.