refactor #2

Open
chapoline wants to merge 2 commits from refactor into main
Owner
No description provided.
chapoline added 1 commit 2024-08-01 20:17:12 +00:00
faercol requested review from faercol 2024-08-02 08:26:56 +00:00
faercol reviewed 2024-08-02 08:52:58 +00:00
config.py Outdated
@ -0,0 +6,4 @@
class Peer:
public_key: str
endpoint: str | None
allowed_ips: str | None = None
Owner

Je sais pas si tu veux le faire ici, mais on pourra transformer ça en une list[str] après, ce sera plus simple à manipuler

Je sais pas si tu veux le faire ici, mais on pourra transformer ça en une `list[str]` après, ce sera plus simple à manipuler
faercol marked this conversation as resolved
@ -0,0 +15,4 @@
allowed = [self.local_translated_range, wireguard_address]
if untranslated_networks != None:
allowed.append(untranslated_networks)
self.allowed_ips = ", ".join(allowed)
Owner

Oui voilà, ça je l'aurais fait dans le template, mais j'aurais gardé la liste pour le stockage dans l'objet

Oui voilà, ça je l'aurais fait dans le template, mais j'aurais gardé la liste pour le stockage dans l'objet
faercol marked this conversation as resolved
@ -0,0 +58,4 @@
default_dns: DNSServer | None = None
dns_servers: dict = {}
remote_networks: dict = {}
peers: array = []
Owner

je crois que c'est list plutot que array ici

je crois que c'est `list` plutot que `array` ici
faercol marked this conversation as resolved
@ -0,0 +106,4 @@
)
def dns_server(self, qname):
# Guess which DNS server call from the requested domain name
Owner

Si tu veux faire une docstring pour la fonction (qui du coup est visible sur ton IDE ou avec un help, tu dois utiliser directement une string et non un commentaire.

Du coup ici

    def dns_server(self, qname):
        "Guess which DNS server to call from the requested domain name"
        ...
Si tu veux faire une docstring pour la fonction (qui du coup est visible sur ton IDE ou avec un `help`, tu dois utiliser directement une string et non un commentaire. Du coup ici ```python def dns_server(self, qname): "Guess which DNS server to call from the requested domain name" ... ```
faercol marked this conversation as resolved
chapoline added 1 commit 2024-08-02 14:22:22 +00:00
faercol approved these changes 2024-08-02 19:02:08 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin refactor:refactor
git checkout refactor

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout main
git merge --no-ff refactor
git checkout refactor
git rebase main
git checkout main
git merge --ff-only refactor
git checkout refactor
git rebase main
git checkout main
git merge --no-ff refactor
git checkout main
git merge --squash refactor
git checkout main
git merge --ff-only refactor
git checkout main
git merge refactor
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: PolyculeConnect/polycule-network#2
No description provided.