Skip to content

Commit

Permalink
fix specs
Browse files Browse the repository at this point in the history
  • Loading branch information
Schultzer committed May 10, 2021
1 parent 05385d2 commit a96171f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/cldr/backend.ex
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ defmodule Cldr.Territory.Backend do
{:error, {Cldr.UnknownLocaleError, "The locale \\"zzz\\" is not known."}}
"""
@spec from_subdivision_code(Cldr.Territory.binary_tag(), [locale: Cldr.Territory.binary_tag()]) :: {:ok, binary()} | {:error, Cldr.Territory.error()}
@spec from_subdivision_code(binary(), [locale: Cldr.Territory.binary_tag()]) :: {:ok, binary()} | {:error, Cldr.Territory.error()}
def from_subdivision_code(subdivision_code, options \\ [locale: unquote(backend).get_locale()])
def from_subdivision_code(subdivision_code, [locale: %LanguageTag{cldr_locale_name: cldr_locale_name}]) do
from_subdivision_code(subdivision_code, [locale: cldr_locale_name])
Expand Down Expand Up @@ -327,7 +327,7 @@ defmodule Cldr.Territory.Backend do
"Kumbria"
"""
@spec from_subdivision_code!(Cldr.Territory.binary_tag(), [locale: Cldr.Territory.binary_tag()]) :: {:ok, binary()} | {:error, Cldr.Territory.error()}
@spec from_subdivision_code!(binary(), [locale: Cldr.Territory.binary_tag()]) :: binary() | no_return()
def from_subdivision_code!(subdivision_code, options \\ [locale: unquote(backend).get_locale()])
def from_subdivision_code!(subdivision_code, [locale: %LanguageTag{cldr_locale_name: cldr_locale_name}]) do
from_subdivision_code!(subdivision_code, [locale: cldr_locale_name])
Expand Down
8 changes: 4 additions & 4 deletions lib/cldr/territory.ex
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ defmodule Cldr.Territory do
HN: %{standard: "Honduras"}, GI: %{standard: "Gibraltar"},
"142": %{standard: "Asia"}, "029": %{...}, ...}
"""
@spec known_territories(Cldr.backend()) :: map()
@spec known_territories(Cldr.backend()) :: map() | {:error, error()}
def known_territories(backend) do
module = Module.concat(backend, Territory)
module.known_territories()
Expand All @@ -129,7 +129,7 @@ defmodule Cldr.Territory do
"ad07" => "Andorra la Vella",
...
"""
@spec known_subdivisions(Cldr.backend()) :: map()
@spec known_subdivisions(Cldr.backend()) :: map() | {:error, error()}
def known_subdivisions(backend) do
module = Module.concat(backend, Territory)
module.known_subdivisions()
Expand Down Expand Up @@ -227,7 +227,7 @@ defmodule Cldr.Territory do
{:error, {Cldr.UnknownLocaleError, "The locale \\"zzz\\" is not known."}}
"""
@spec from_subdivision_code(atom_binary_tag(), Cldr.backend(), [locale: binary_tag()]) ::
@spec from_subdivision_code(binary(), Cldr.backend(), [locale: binary_tag()]) ::
{:ok, binary()} | {:error, error()}
def from_subdivision_code(
subdivision_code,
Expand Down Expand Up @@ -271,7 +271,7 @@ defmodule Cldr.Territory do
"Kumbria"
"""
@spec from_subdivision_code!(atom_binary_tag(), Cldr.backend(), [locale: binary_tag()]) ::
@spec from_subdivision_code!(binary(), Cldr.backend(), [locale: binary_tag()]) ::
binary() | no_return()
def from_subdivision_code!(
territory_code,
Expand Down

0 comments on commit a96171f

Please sign in to comment.