| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -187,8 +187,7 @@ jobs: | |||
| 187 | 187 | fetch-depth: 0 | |
| 188 | 188 | ref: ${{ github.ref }} | |
| 189 | 189 | ||
| 190 | - - name: Create local branch name | ||
| 191 | - env: | ||
| 190 | + - env: | ||
| 192 | 191 | BRANCH: ${{ github.head_ref || github.ref_name }} | |
| 193 | 192 | run: git switch -C "$BRANCH" | |
| 194 | 193 | ||
@@ -222,8 +221,7 @@ jobs: | |||
| 222 | 221 | fetch-depth: 0 | |
| 223 | 222 | ref: ${{ github.ref }} | |
| 224 | 223 | ||
| 225 | - - name: Create local branch name | ||
| 226 | - env: | ||
| 224 | + - env: | ||
| 227 | 225 | BRANCH: ${{ github.ref_name }} | |
| 228 | 226 | run: git switch -C "$BRANCH" | |
| 229 | 227 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -106,8 +106,6 @@ def entry_to_string(self, hdr: str, other: bytes | str | None) -> str: | |||
| 106 | 106 | ||
| 107 | 107 | ||
| 108 | 108 | class DNSQuestion(DNSEntry): | |
| 109 | - """A DNS question entry""" | ||
| 110 | - | ||
| 111 | 109 | __slots__ = ("_hash",) | |
| 112 | 110 | ||
| 113 | 111 | def __init__(self, name: str, type_: int, class_: int) -> None: | |
@@ -234,8 +232,6 @@ def to_string(self, other: bytes | str) -> str: | |||
| 234 | 232 | ||
| 235 | 233 | ||
| 236 | 234 | class DNSAddress(DNSRecord): | |
| 237 | - """A DNS address record""" | ||
| 238 | - | ||
| 239 | 235 | __slots__ = ("_hash", "address", "scope_id") | |
| 240 | 236 | ||
| 241 | 237 | def __init__( | |
@@ -342,8 +338,6 @@ def __repr__(self) -> str: | |||
| 342 | 338 | ||
| 343 | 339 | ||
| 344 | 340 | class DNSPointer(DNSRecord): | |
| 345 | - """A DNS pointer record""" | ||
| 346 | - | ||
| 347 | 341 | __slots__ = ("_hash", "alias", "alias_key") | |
| 348 | 342 | ||
| 349 | 343 | def __init__( | |
@@ -395,8 +389,6 @@ def __repr__(self) -> str: | |||
| 395 | 389 | ||
| 396 | 390 | ||
| 397 | 391 | class DNSText(DNSRecord): | |
| 398 | - """A DNS text record""" | ||
| 399 | - | ||
| 400 | 392 | __slots__ = ("_hash", "text") | |
| 401 | 393 | ||
| 402 | 394 | def __init__( | |
@@ -439,8 +431,6 @@ def __repr__(self) -> str: | |||
| 439 | 431 | ||
| 440 | 432 | ||
| 441 | 433 | class DNSService(DNSRecord): | |
| 442 | - """A DNS service record""" | ||
| 443 | - | ||
| 444 | 434 | __slots__ = ("_hash", "port", "priority", "server", "server_key", "weight") | |
| 445 | 435 | ||
| 446 | 436 | def __init__( | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -524,7 +524,6 @@ def test_first_query_delay(): | |||
| 524 | 524 | first_query_time = None | |
| 525 | 525 | ||
| 526 | 526 | def send(out, addr=const._MDNS_ADDR, port=const._MDNS_PORT): | |
| 527 | - """Sends an outgoing packet.""" | ||
| 528 | 527 | nonlocal first_query_time | |
| 529 | 528 | if first_query_time is None: | |
| 530 | 529 | first_query_time = current_time_millis() | |
@@ -578,7 +577,6 @@ def on_service_state_change(zeroconf, service_type, state_change, name): | |||
| 578 | 577 | questions: list[list[DNSQuestion]] = [] | |
| 579 | 578 | ||
| 580 | 579 | def send(out, addr=const._MDNS_ADDR, port=const._MDNS_PORT, v6_flow_scope=()): | |
| 581 | - """Sends an outgoing packet.""" | ||
| 582 | 580 | pout = r.DNSIncoming(out.packets()[0]) | |
| 583 | 581 | questions.append(pout.questions) | |
| 584 | 582 | got_query.set() | |
@@ -680,7 +678,6 @@ def on_service_state_change(zeroconf, service_type, state_change, name): | |||
| 680 | 678 | packets = [] | |
| 681 | 679 | ||
| 682 | 680 | def send(out, addr=const._MDNS_ADDR, port=const._MDNS_PORT, v6_flow_scope=()): | |
| 683 | - """Sends an outgoing packet.""" | ||
| 684 | 681 | pout = r.DNSIncoming(out.packets()[0]) | |
| 685 | 682 | packets.append(pout) | |
| 686 | 683 | got_query.set() | |
@@ -773,7 +770,6 @@ async def test_asking_qm_questions(): | |||
| 773 | 770 | first_outgoing = None | |
| 774 | 771 | ||
| 775 | 772 | def send(out, addr=const._MDNS_ADDR, port=const._MDNS_PORT): | |
| 776 | - """Sends an outgoing packet.""" | ||
| 777 | 773 | nonlocal first_outgoing | |
| 778 | 774 | if first_outgoing is None: | |
| 779 | 775 | first_outgoing = out | |
@@ -813,7 +809,6 @@ async def test_asking_qu_questions(): | |||
| 813 | 809 | first_outgoing = None | |
| 814 | 810 | ||
| 815 | 811 | def send(out, addr=const._MDNS_ADDR, port=const._MDNS_PORT): | |
| 816 | - """Sends an outgoing packet.""" | ||
| 817 | 812 | nonlocal first_outgoing | |
| 818 | 813 | if first_outgoing is None: | |
| 819 | 814 | first_outgoing = out | |
@@ -1257,7 +1252,6 @@ async def test_query_scheduler(): | |||
| 1257 | 1252 | sends: list[r.DNSIncoming] = [] | |
| 1258 | 1253 | ||
| 1259 | 1254 | def send(out, addr=const._MDNS_ADDR, port=const._MDNS_PORT, v6_flow_scope=()): | |
| 1260 | - """Sends an outgoing packet.""" | ||
| 1261 | 1255 | pout = r.DNSIncoming(out.packets()[0]) | |
| 1262 | 1256 | sends.append(pout) | |
| 1263 | 1257 | ||
@@ -1350,7 +1344,6 @@ async def test_query_scheduler_rescue_records(): | |||
| 1350 | 1344 | sends: list[r.DNSIncoming] = [] | |
| 1351 | 1345 | ||
| 1352 | 1346 | def send(out, addr=const._MDNS_ADDR, port=const._MDNS_PORT, v6_flow_scope=()): | |
| 1353 | - """Sends an outgoing packet.""" | ||
| 1354 | 1347 | pout = r.DNSIncoming(out.packets()[0]) | |
| 1355 | 1348 | sends.append(pout) | |
| 1356 | 1349 | ||
@@ -1664,7 +1657,6 @@ def on_service_state_change(zeroconf, service_type, state_change, name): | |||
| 1664 | 1657 | sends: list[r.DNSIncoming] = [] | |
| 1665 | 1658 | ||
| 1666 | 1659 | def send(out, addr=const._MDNS_ADDR, port=const._MDNS_PORT, v6_flow_scope=()): | |
| 1667 | - """Sends an outgoing packet.""" | ||
| 1668 | 1660 | pout = r.DNSIncoming(out.packets()[0]) | |
| 1669 | 1661 | sends.append(pout) | |
| 1670 | 1662 | ||
@@ -1732,7 +1724,6 @@ def on_service_state_change(zeroconf, service_type, state_change, name): | |||
| 1732 | 1724 | sends: list[r.DNSIncoming] = [] | |
| 1733 | 1725 | ||
| 1734 | 1726 | def send(out, addr=const._MDNS_ADDR, port=const._MDNS_PORT, v6_flow_scope=()): | |
| 1735 | - """Sends an outgoing packet.""" | ||
| 1736 | 1727 | pout = r.DNSIncoming(out.packets()[0]) | |
| 1737 | 1728 | sends.append(pout) | |
| 1738 | 1729 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -273,7 +273,6 @@ def test_get_info_partial(self): | |||
| 273 | 273 | last_sent: r.DNSOutgoing | None = None | |
| 274 | 274 | ||
| 275 | 275 | def send(out, addr=const._MDNS_ADDR, port=const._MDNS_PORT, v6_flow_scope=()): | |
| 276 | - """Sends an outgoing packet.""" | ||
| 277 | 276 | nonlocal last_sent | |
| 278 | 277 | ||
| 279 | 278 | last_sent = out | |
@@ -413,7 +412,6 @@ def test_get_info_suppressed_by_question_history(self): | |||
| 413 | 412 | last_sent: r.DNSOutgoing | None = None | |
| 414 | 413 | ||
| 415 | 414 | def send(out, addr=const._MDNS_ADDR, port=const._MDNS_PORT, v6_flow_scope=()): | |
| 416 | - """Sends an outgoing packet.""" | ||
| 417 | 415 | nonlocal last_sent | |
| 418 | 416 | ||
| 419 | 417 | last_sent = out | |
@@ -1254,7 +1252,6 @@ def test_asking_qu_questions(quick_request_timing): | |||
| 1254 | 1252 | first_outgoing = None | |
| 1255 | 1253 | ||
| 1256 | 1254 | def send(out, addr=const._MDNS_ADDR, port=const._MDNS_PORT): | |
| 1257 | - """Sends an outgoing packet.""" | ||
| 1258 | 1255 | nonlocal first_outgoing | |
| 1259 | 1256 | if first_outgoing is None: | |
| 1260 | 1257 | first_outgoing = out | |
@@ -1280,7 +1277,6 @@ def test_asking_qm_questions(quick_request_timing): | |||
| 1280 | 1277 | first_outgoing = None | |
| 1281 | 1278 | ||
| 1282 | 1279 | def send(out, addr=const._MDNS_ADDR, port=const._MDNS_PORT): | |
| 1283 | - """Sends an outgoing packet.""" | ||
| 1284 | 1280 | nonlocal first_outgoing | |
| 1285 | 1281 | if first_outgoing is None: | |
| 1286 | 1282 | first_outgoing = out | |
@@ -1317,7 +1313,6 @@ async def test_we_try_four_times_with_random_delay(): | |||
| 1317 | 1313 | request_count = 0 | |
| 1318 | 1314 | ||
| 1319 | 1315 | def async_send(out, addr=const._MDNS_ADDR, port=const._MDNS_PORT): | |
| 1320 | - """Sends an outgoing packet.""" | ||
| 1321 | 1316 | nonlocal request_count | |
| 1322 | 1317 | request_count += 1 | |
| 1323 | 1318 | ||
@@ -2161,7 +2156,6 @@ async def test_unicast_flag_if_requested() -> None: | |||
| 2161 | 2156 | aiozc = AsyncZeroconf(interfaces=["127.0.0.1"]) | |
| 2162 | 2157 | ||
| 2163 | 2158 | def async_send(out: DNSOutgoing, addr: str | None = None, port: int = const._MDNS_PORT) -> None: | |
| 2164 | - """Sends an outgoing packet.""" | ||
| 2165 | 2159 | for question in out.questions: | |
| 2166 | 2160 | assert question.unicast | |
| 2167 | 2161 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1027,7 +1027,6 @@ def on_service_state_change(zeroconf, service_type, state_change, name): | |||
| 1027 | 1027 | packets = [] | |
| 1028 | 1028 | ||
| 1029 | 1029 | def send(out, addr=const._MDNS_ADDR, port=const._MDNS_PORT, v6_flow_scope=()): | |
| 1030 | - """Sends an outgoing packet.""" | ||
| 1031 | 1030 | pout = DNSIncoming(out.packets()[0]) | |
| 1032 | 1031 | packets.append(pout) | |
| 1033 | 1032 | last_answers = pout.answers() | |
@@ -1191,7 +1190,6 @@ async def test_info_asking_default_is_asking_qm_questions_after_the_first_qu(qui | |||
| 1191 | 1190 | second_outgoing = None | |
| 1192 | 1191 | ||
| 1193 | 1192 | def send(out, addr=const._MDNS_ADDR, port=const._MDNS_PORT): | |
| 1194 | - """Sends an outgoing packet.""" | ||
| 1195 | 1193 | nonlocal first_outgoing | |
| 1196 | 1194 | nonlocal second_outgoing | |
| 1197 | 1195 | if out.questions: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -72,7 +72,6 @@ def get_ttl(record_type): | |||
| 72 | 72 | return const._DNS_OTHER_TTL | |
| 73 | 73 | ||
| 74 | 74 | def _process_outgoing_packet(out): | |
| 75 | - """Sends an outgoing packet.""" | ||
| 76 | 75 | nonlocal nbr_answers, nbr_additionals, nbr_authorities | |
| 77 | 76 | ||
| 78 | 77 | for answer, _ in out.answers: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,16 +29,6 @@ def teardown_module(): | |||
| 29 | 29 | ||
| 30 | 30 | ||
| 31 | 31 | class Names(unittest.TestCase): | |
| 32 | - def test_long_name(self): | ||
| 33 | - generated = r.DNSOutgoing(const._FLAGS_QR_RESPONSE) | ||
| 34 | - question = r.DNSQuestion( | ||
| 35 | - "this.is.a.very.long.name.with.lots.of.parts.in.it.local.", | ||
| 36 | - const._TYPE_SRV, | ||
| 37 | - const._CLASS_IN, | ||
| 38 | - ) | ||
| 39 | - generated.add_question(question) | ||
| 40 | - r.DNSIncoming(generated.packets()[0]) | ||
| 41 | - | ||
| 42 | 32 | def test_exceedingly_long_name(self): | |
| 43 | 33 | generated = r.DNSOutgoing(const._FLAGS_QR_RESPONSE) | |
| 44 | 34 | name = f"{'part.' * 1000}local." | |
| Back | FazBrowse Home | New Git URL |
0 commit comments