Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rorybyrne/anot

Extract annotations from source-code comments.
https://github.com/rorybyrne/anot

Last synced: 4 days ago
JSON representation

Extract annotations from source-code comments.

Awesome Lists containing this project

README

        

# anot
Extract annotations from source-code comments.

# Usage

```python
# file.py

class Something(Experiment):
# @note: this experiment will be re-written later

def run(self):
...

x = 5 # @hypothesis: 5 is better than 4

...
```

```bash
$ anot file.py --treesitter --tags hypothesis,note,todo --yaml

annotations:
- kind: note
content: this experiment will be re-written later
context:
node_type: class_definition
parent_type: module
associated_name: Something
line_range: [2, 7]
- kind: hypothesis
content: 5 is better than 4
context:
node_type: assignment
parent_type: function_definition
associated_name: run
line_number: 5
variable_name: x
```