@@ -1549,6 +1549,8 @@ msgid ""
1549
1549
"For type checkers that simply check against a fixed set of values, consider "
1550
1550
"using the choices_ keyword instead."
1551
1551
msgstr ""
1552
+ "Para verificadores de tipo que simplesmente verificam um conjunto fixo de "
1553
+ "valores, considere usar o argumento nomeado choices_."
1552
1554
1553
1555
#: ../../library/argparse.rst:1211
1554
1556
msgid "choices"
@@ -1562,25 +1564,39 @@ msgid ""
1562
1564
"line is parsed, argument values will be checked, and an error message will "
1563
1565
"be displayed if the argument was not one of the acceptable values::"
1564
1566
msgstr ""
1567
+ "Alguns argumentos de linha de comando devem ser selecionados em um conjunto "
1568
+ "restrito de valores. Eles podem ser tratados passando um objeto sequência "
1569
+ "como o argumento nomeado *choices* para :meth:`~ArgumentParser."
1570
+ "add_argument`. Quando a linha de comando for analisada, os valores dos "
1571
+ "argumentos serão verificados e uma mensagem de erro será exibida se o "
1572
+ "argumento não for um dos valores aceitáveis::"
1565
1573
1566
1574
#: ../../library/argparse.rst:1228
1567
1575
msgid ""
1568
1576
"Note that inclusion in the *choices* sequence is checked after any type_ "
1569
1577
"conversions have been performed, so the type of the objects in the *choices* "
1570
1578
"sequence should match the type_ specified::"
1571
1579
msgstr ""
1580
+ "Observe que a inclusão na sequência *choices* é verificada após qualquer "
1581
+ "conversão de type_ ter sido realizada, portanto o tipo dos objetos na "
1582
+ "sequência *choices* deve corresponder ao type_ especificado::"
1572
1583
1573
1584
#: ../../library/argparse.rst:1240
1574
1585
msgid ""
1575
1586
"Any sequence can be passed as the *choices* value, so :class:`list` "
1576
1587
"objects, :class:`tuple` objects, and custom sequences are all supported."
1577
1588
msgstr ""
1589
+ "Qualquer sequência pode ser passada como o valor *choices*, portanto "
1590
+ "objetos :class:`list`, objetos :class:`tuple` e sequências personalizadas "
1591
+ "são todos suportados."
1578
1592
1579
1593
#: ../../library/argparse.rst:1243
1580
1594
msgid ""
1581
1595
"Use of :class:`enum.Enum` is not recommended because it is difficult to "
1582
1596
"control its appearance in usage, help, and error messages."
1583
1597
msgstr ""
1598
+ "O uso de :class:`enum.Enum` não é recomendado porque é difícil controlar sua "
1599
+ "aparência no uso, na ajuda e nas mensagens de erro."
1584
1600
1585
1601
#: ../../library/argparse.rst:1246
1586
1602
msgid ""
@@ -1589,6 +1605,10 @@ msgid ""
1589
1605
"*dest* parameter. If this display isn't desirable (perhaps because there "
1590
1606
"are many choices), just specify an explicit metavar_."
1591
1607
msgstr ""
1608
+ "As opções formatadas substituem o *metavar* padrão que normalmente é "
1609
+ "derivado de *dest*. Geralmente é isso que você deseja porque o usuário nunca "
1610
+ "vê o parâmetro *dest*. Se esta exibição não for desejável (talvez porque "
1611
+ "haja muitas opções), basta especificar um metavar_ explícito."
1592
1612
1593
1613
#: ../../library/argparse.rst:1255
1594
1614
msgid "required"
@@ -1601,19 +1621,30 @@ msgid ""
1601
1621
"command line. To make an option *required*, ``True`` can be specified for "
1602
1622
"the ``required=`` keyword argument to :meth:`~ArgumentParser.add_argument`::"
1603
1623
msgstr ""
1624
+ "Em geral, o módulo :mod:`argparse` presume que sinalizadores como ``-f`` e "
1625
+ "``--bar`` indicam argumentos *opcionais*, que sempre podem ser omitidos na "
1626
+ "linha de comando. Para tornar uma opção obrigatória, ``True`` pode ser "
1627
+ "especificado para o argumento nomeado ``required=`` para :meth:"
1628
+ "`~ArgumentParser.add_argument`::"
1604
1629
1605
1630
#: ../../library/argparse.rst:1270
1606
1631
msgid ""
1607
1632
"As the example shows, if an option is marked as ``required``, :meth:"
1608
1633
"`~ArgumentParser.parse_args` will report an error if that option is not "
1609
1634
"present at the command line."
1610
1635
msgstr ""
1636
+ "Como mostra o exemplo, se uma opção estiver marcada como ``required``, :meth:"
1637
+ "`~ArgumentParser.parse_args` reportará um erro se essa opção não estiver "
1638
+ "presente na linha de comando."
1611
1639
1612
1640
#: ../../library/argparse.rst:1276
1613
1641
msgid ""
1614
1642
"Required options are generally considered bad form because users expect "
1615
1643
"*options* to be *optional*, and thus they should be avoided when possible."
1616
1644
msgstr ""
1645
+ "As opções obrigatórias são geralmente consideradas inadequadas porque os "
1646
+ "usuários esperam que as *opções* sejam *opcionais* e, portanto, devem ser "
1647
+ "evitadas quando possível."
1617
1648
1618
1649
#: ../../library/argparse.rst:1283
1619
1650
msgid "help"
@@ -1626,6 +1657,10 @@ msgid ""
1626
1657
"at the command line), these ``help`` descriptions will be displayed with "
1627
1658
"each argument::"
1628
1659
msgstr ""
1660
+ "O valor ``help`` é uma string contendo uma breve descrição do argumento. "
1661
+ "Quando um usuário solicita ajuda (geralmente usando ``-h`` ou ``--help`` na "
1662
+ "linha de comando), estas descrições de ``help`` serão exibidas com cada "
1663
+ "argumento::"
1629
1664
1630
1665
#: ../../library/argparse.rst:1305
1631
1666
msgid ""
@@ -1635,18 +1670,28 @@ msgid ""
1635
1670
"arguments to :meth:`~ArgumentParser.add_argument`, e.g. ``%(default)s``, "
1636
1671
"``%(type)s``, etc.::"
1637
1672
msgstr ""
1673
+ "As strings ``help`` podem incluir vários especificadores de formato para "
1674
+ "evitar a repetição de coisas como o nome do programa ou o argumento "
1675
+ "default_. Os especificadores disponíveis incluem o nome do programa, "
1676
+ "``%(prog)s`` e a maioria dos argumentos nomeados para :meth:`~ArgumentParser."
1677
+ "add_argument`, por exemplo. ``%(default)s``, ``%(type)s``, etc.::"
1638
1678
1639
1679
#: ../../library/argparse.rst:1322
1640
1680
msgid ""
1641
1681
"As the help string supports %-formatting, if you want a literal ``%`` to "
1642
1682
"appear in the help string, you must escape it as ``%%``."
1643
1683
msgstr ""
1684
+ "Como a string de ajuda oferece suporte à formatação com %, se você quiser "
1685
+ "que um literal ``%`` apareça na string de ajuda, você deve escapá-lo como ``%"
1686
+ "%``."
1644
1687
1645
1688
#: ../../library/argparse.rst:1325
1646
1689
msgid ""
1647
1690
":mod:`argparse` supports silencing the help entry for certain options, by "
1648
1691
"setting the ``help`` value to ``argparse.SUPPRESS``::"
1649
1692
msgstr ""
1693
+ ":mod:`argparse` oferece suporte a silenciar a entrada de ajuda para certas "
1694
+ "opções, definindo o valor ``help`` como ``argparse.SUPPRESS``::"
1650
1695
1651
1696
#: ../../library/argparse.rst:1340
1652
1697
msgid "metavar"
@@ -1663,24 +1708,39 @@ msgid ""
1663
1708
"optional argument ``--foo`` that should be followed by a single command-line "
1664
1709
"argument will be referred to as ``FOO``. An example::"
1665
1710
msgstr ""
1711
+ "Quando :class:`ArgumentParser` gera mensagens de ajuda, ele precisa de "
1712
+ "alguma forma de se referir a cada argumento esperado. Por padrão, os objetos "
1713
+ "ArgumentParser usam o valor dest_ como o \" nome\" de cada objeto. Por "
1714
+ "padrão, para ações de argumentos posicionais, o valor dest_ é usado "
1715
+ "diretamente, e para ações de argumentos opcionais, o valor dest_ é "
1716
+ "maiúsculo. Portanto, um único argumento posicional com ``dest='bar'`` será "
1717
+ "referido como ``bar``. Um único argumento opcional ``--foo`` que deve ser "
1718
+ "seguido por um único argumento de linha de comando será referido como "
1719
+ "``FOO``. Um exemplo::"
1666
1720
1667
1721
#: ../../library/argparse.rst:1366
1668
1722
msgid "An alternative name can be specified with ``metavar``::"
1669
- msgstr ""
1723
+ msgstr "Um nome alternativo pode ser especificado com ``metavar``:: "
1670
1724
1671
1725
#: ../../library/argparse.rst:1383
1672
1726
msgid ""
1673
1727
"Note that ``metavar`` only changes the *displayed* name - the name of the "
1674
1728
"attribute on the :meth:`~ArgumentParser.parse_args` object is still "
1675
1729
"determined by the dest_ value."
1676
1730
msgstr ""
1731
+ "Observe que ``metavar`` apenas altera o nome *exibido* - o nome do atributo "
1732
+ "no objeto :meth:`~ArgumentParser.parse_args` ainda é determinado pelo valor "
1733
+ "dest_."
1677
1734
1678
1735
#: ../../library/argparse.rst:1387
1679
1736
msgid ""
1680
1737
"Different values of ``nargs`` may cause the metavar to be used multiple "
1681
1738
"times. Providing a tuple to ``metavar`` specifies a different display for "
1682
1739
"each of the arguments::"
1683
1740
msgstr ""
1741
+ "Valores diferentes de ``nargs`` podem fazer com que o metavar seja usado "
1742
+ "múltiplas vezes. Fornecer uma tupla para ``metavar`` especifica uma exibição "
1743
+ "diferente para cada um dos argumentos::"
1684
1744
1685
1745
#: ../../library/argparse.rst:1406
1686
1746
msgid "dest"
@@ -1695,6 +1755,12 @@ msgid ""
1695
1755
"is normally supplied as the first argument to :meth:`~ArgumentParser."
1696
1756
"add_argument`::"
1697
1757
msgstr ""
1758
+ "A maioria das ações :class:`ArgumentParser` adiciona algum valor como um "
1759
+ "atributo do objeto retornado por :meth:`~ArgumentParser.parse_args`. O nome "
1760
+ "deste atributo é determinado pelo argumento nomeado ``dest`` de :meth:"
1761
+ "`~ArgumentParser.add_argument`. Para ações de argumento posicional, ``dest`` "
1762
+ "é normalmente fornecido como o primeiro argumento para :meth:"
1763
+ "`~ArgumentParser.add_argument`::"
1698
1764
1699
1765
#: ../../library/argparse.rst:1420
1700
1766
msgid ""
@@ -1707,14 +1773,23 @@ msgid ""
1707
1773
"characters to make sure the string is a valid attribute name. The examples "
1708
1774
"below illustrate this behavior::"
1709
1775
msgstr ""
1776
+ "Para ações de argumentos opcionais, o valor de ``dest`` é normalmente "
1777
+ "inferido das strings de opções. :class:`ArgumentParser` gera o valor de "
1778
+ "``dest`` pegando a primeira string de opção longa e removendo a string "
1779
+ "inicial ``--``. Se nenhuma string de opção longa for fornecida, ``dest`` "
1780
+ "será derivado da primeira string de opção curta removendo o caractere ``-`` "
1781
+ "inicial. Quaisquer caracteres ``-`` internos serão convertidos em "
1782
+ "caracteres ``_`` para garantir que a string seja um nome de atributo válido. "
1783
+ "Os exemplos abaixo ilustram esse comportamento:"
1710
1784
1711
1785
#: ../../library/argparse.rst:1437
1712
1786
msgid "``dest`` allows a custom attribute name to be provided::"
1713
1787
msgstr ""
1788
+ "``dest`` permite que um nome de atributo personalizado seja fornecido::"
1714
1789
1715
1790
#: ../../library/argparse.rst:1448
1716
1791
msgid "deprecated"
1717
- msgstr ""
1792
+ msgstr "deprecated "
1718
1793
1719
1794
#: ../../library/argparse.rst:1450
1720
1795
msgid ""
@@ -1726,6 +1801,13 @@ msgid ""
1726
1801
"the future. For arguments, if ``deprecated`` is ``True``, then a warning "
1727
1802
"will be printed to standard error when the argument is used::"
1728
1803
msgstr ""
1804
+ "Durante a vida de um projeto, alguns argumentos podem precisar ser removidos "
1805
+ "da linha de comando. Antes de removê-los, você deve informar aos seus "
1806
+ "usuários que os argumentos estão descontinuados e serão removidos. O "
1807
+ "argumento nomeado ``deprecated`` de :meth:`~ArgumentParser.add_argument`, "
1808
+ "cujo padrão é ``False``, especifica se o argumento está descontinuado e será "
1809
+ "removido no futuro. Para argumentos, se ``deprecated`` for ``True``, então "
1810
+ "um aviso será impresso no erro padrão quando o argumento for usado::"
1729
1811
1730
1812
#: ../../library/argparse.rst:1473
1731
1813
msgid "Action classes"
0 commit comments