Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM python:3.13-slim
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think you could use an alpine based image instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, will do!


# Install Java
RUN apt update && \
apt install -y curl telnet git

## Pip dependencies
# Upgrade pip
RUN pip install --upgrade pip

# Install production dependencies
COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt && \
rm /tmp/requirements.txt

# Install development dependencies
COPY dev-requirements.txt /tmp/requirements-dev.txt
RUN pip install -r /tmp/requirements-dev.txt && \
rm /tmp/requirements-dev.txt
6 changes: 6 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"build": {
"dockerfile": "Dockerfile",
"context": ".."
}
}
6 changes: 3 additions & 3 deletions sievelib/managesieve.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def __read_line(self) -> bytes:
return ret

def __read_response(self, nblines: int = -1) -> Tuple[bytes, bytes, bytes]:
"""Read a response from the server.
r"""Read a response from the server.

In the usual case, we read lines until we find one that looks
like a response (OK|NO|BYE\s*(.+)?).
Expand Down Expand Up @@ -214,7 +214,7 @@ def __read_response(self, nblines: int = -1) -> Tuple[bytes, bytes, bytes]:
return (code, data, resp)

def __prepare_args(self, args: List[Any]) -> List[bytes]:
"""Format command arguments before sending them.
r"""Format command arguments before sending them.

Command arguments of type string must be quoted, the only
exception concerns size indication (of the form {\d\+?}).
Expand Down Expand Up @@ -307,7 +307,7 @@ def __get_capabilities(self) -> bool:
return True

def __parse_error(self, text: bytes):
"""Parse an error received from the server.
r"""Parse an error received from the server.

if text corresponds to a size indication, we grab the
remaining content from the server.
Expand Down
2 changes: 1 addition & 1 deletion sievelib/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __str__(self):


class Lexer:
"""
r"""
The lexical analysis part.

This class provides a simple way to define tokens (with patterns)
Expand Down